我有2个工作表,需要匹配emply ID并读取具有公式的PN。例如: Emply ID P / N. 1234西尔斯 5678 Macys 代码:
ws1.Select
Do While IsEmpty(Cells(i, EmpID)) = False
Str = Cells(i, EmpID)
result = Cells(i, PN)
ws2.Select
On Error Resume Next
result1 = Application.WorksheetFunction.VLookup(Str, ws2.Range("B2:B3000"), 2, False)
If (Err <> 0) Then
Else
ws1.Select
If (result = result1) Then
Cells(i, 10) = ""
Else
Cells(i, 10) = result1
End If
在PN列中有一个公式。请指教。