i have a code here





Sub lookup()
Dim ws As Worksheet: Set ws = Worksheets("[XXXXX XXXXX XXXXX XXXXX.xlsx]XXXXX_XXXXX") 'located at the other drive
With Sheets("Sheet2").Cells(2, 23) 'active sheet [sheet2]
    .Formula = "=IFERROR(IF(VLOOKUP(A" & ActiveCell.Row & ",X:\XXXXX\XXXXX\[XXXXX.xlsx]XXXXX_XXXXX!A:B,2,0)=0,""TBD"",VLOOKUP(A" & ActiveCell.Row & ",X:\XXXXX\XXXXX\[XXXXX.xlsx]XXXXX_XXXXX!!A:B,2,0)),""TBD"")"
    .AutoFill Range("W2:W" & Cells(Rows.Count, 1).End(xlUp).Row)
End With

End Sub


i want to look up on the other drive. my table matrix is in the other drive.



any one can help.



thanks.