A表
B表
代码
Sub kk()
Dim FJX
Sheets("COM").Select
Sheets("COM").Range("b2:e3000").Select
Selection.ClearContents
i = 2
k = 1
Do While Cells(i, 1) <> ""
Cells(i, 1).Select
uu = Cells(i, 1)
Set FJX = Sheets("M").Columns("A").Find(uu, AFTER:=[A1], lookat:=xlWhole)
If Not FJX Is Nothing Then
Cells(i, 2) = Sheets("M").Cells(FJX.Row, 2).Value
Cells(i, 3) = Sheets("M").Cells(FJX.Row, 3).Value
Cells(i, 4) = Sheets("M").Cells(FJX.Row, 4).Value
Cells(i, 5) = Sheets("M").Cells(FJX.Row, 5).Value
End If
i = i + 1
Loop
MsgBox ("OK")
Range("a1").Select
End Sub
Sub qingl()
Sheets("COM").Select
Range("b2:e3000").Select
Selection.ClearContents
Range("a1").Select
End Sub