Function zhyh(rng As Range) Dim col&, m& Application.Volatile col = rng.Column m = Sheet1.Cells(65536, col).End(xlUp).Row If m <> 1 Then zhyh = Sheet1.Cells(m, col) Else zhyh = "" End If End Function
Sub yy() Dim i&, Myc%, Arr Dim d, k, t Set d = CreateObject("Scripting.Dictionary") Myc = Sheet1.[iv1].End(xlToLeft).Column Arr = Sheet1.Range("a1", Cells(1, Myc)) For i = 1 To UBound(Arr, 2) If Arr(1, i) <> "" Then d(Arr(1, i)) = d(Arr(1, i)) + 1 End If Next k = d.keys t = d.items Sheet2.Activate Sheet2.[a1].Resize(1, UBound(k) + 1) = k Sheet2.[a2].Resize(1, UBound(k) + 1) = t End Sub
Function zhyh(rng As Range) Dim col&, m& Application.Volatile col = rng.Column m = Sheet1.Cells(65536, col).End(xlUp).Row If m <> 1 Then zhyh = Sheet1.Cells(m, col) Else zhyh = "" End If End Function
Function zhyh(rng As Range) Dim col&, m& Application.Volatile col = rng.Column m = Sheet1.Cells(65536, col).End(xlUp).Row If m <> 1 Then zhyh = Sheet1.Cells(m, col) Else zhyh = "" End If End Function
Function zhyh(rng As Range) Dim col&, m& Application.Volatile col = rng.Column m = Sheet1.Cells(65536, col).End(xlUp).Row If m <> 1 Then zhyh = Sheet1.Cells(m, col) Else zhyh = "" End If End Function