Sub wlookup()
For i = 2 To [a1].End(xlDown).Row
If Not (Sheets(2).Cells(i, 1) = Empty) Then
Sheets(2).Cells(i, 2) = Sheets(1).Cells(Sheets(1).[am:am].Find(Sheets(2).Cells(i, 1)).Row, [au:au].Column)
End If
Next i
End Sub
Sub wlookup()
For i = 2 To [a1].End(xlDown).Row
If Not (Sheets(2).Cells(i, 1) = Empty) Then
Sheets(2).Cells(i, 2) = Sheets(1).Cells(Sheets(1).[am:am].Find(Sheets(2).Cells(i, 1)).Row, [au:au].Column)
End If
Next i
End Sub
本文标题:财务用VBA之vlookup
本文链接:https://www.haomeiwen.com/subject/egwuuftx.html
网友评论