Hi Ozgrid experts,
I am trying to use Vlookup function across workbooks, but it does not seem to work. I have one mastersheet called "Packing Slips", in which there is worksheet "WORK ORDER" where I keep track of the status of all the orders. I also have another workbook called "Inspection Report", in which there is a worksheet called 'InspectionReportSummary" .Please kindly see files uploaded below:
https://drive.google.com/drive…PF9oWGCLk7kKZ?usp=sharing
I tried to use Vlookup function embedded into the button "Update W/O Status" on the Work Order sheet to update column "FINISHED" if the order has been entered on the "InspectionReportSummary" sheet. But it did not work.
Can anyone please help? I would really appreciate it.
[VBA]Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim lsttrw As Integer
Dim j As Integer
Workbooks("PACKING SLIPS.xlsm").Worksheets("WORK ORDER").Activate
With ActiveSheet
lsttrw = Range("A" & Rows.Count).End(xlUp).Row
For j = 2 To lsttrw
Cells(j, 10).Activate
'ActiveCell.Formula = "=IF(ISERROR(MATCH([@TRAVELER],'Z:\Production\AVP-Shop\2019\INSPECTION REPORT.xlsm'!Table333[Traveler],0)),1,2)"
ActiveCell.Formula = "=vlookup(" & ActiveCell.Offset(0, -9).Address(False, False) & ",INSPECTION REPORT.xlsm!Table333[#Data],15,False)"
Next j
End With
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub[/VBA]