|
Sub 查找()
Dim a As Integer
Dim b(1 To 63356) As String
Dim c As Integer, d As Integer
c = 1: d = 1
a = WorksheetFunction.CountA(Range("a:a"))
Range("a1").Select
For x = 1 To a
If WorksheetFunction.CountIf(Range("b:b"), Selection) > 0 Then
b(c) = ActiveCell.Value
ActiveCell.Offset(1, 0).Select
c = c + 1
Else
ActiveCell.Offset(1, 0).Select
End If
Next
Range("c1").Select
For x = 1 To c - 1
ActiveCell.Value = b(d)
d = d + 1
ActiveCell.Offset(1, 0).Select
Next
End Sub
|
|