|
Sub test()
Dim r%, i%, j%, c%, str$
Dim arr, brr
Dim d As Object
Set d = CreateObject("scripting.dictionary")
str = "k,m,o,q"
With Worksheets("sheet1")
brr = Split(str, ",")
For c = 0 To UBound(brr)
r = .Columns(brr(c) & ":" & brr(c)).Find(what:="*", LookIn:=xlValues, lookat:=xlWhole, searchorder:=xlByRows, searchdirection:=xlPrevious).Row
arr = .Range(brr(c) & "3:" & brr(c) & r)
For j = 1 To UBound(arr, 2)
For i = 1 To UBound(arr)
If Len(arr(i, j)) <> 0 Then
d(arr(i, j)) = ""
End If
Next
Next
Next
.Range("a2").Resize(d.Count, 1) = Application.Transpose(d.keys)
End With
End Sub
|
评分
-
1
查看全部评分
-
|