If I understand you correctly, maybe :
To test the sub :
Copy your 1.xls and 2.xls to a test folder. For example in drive D:\test
Create new workbook, name it Macro.xlsm then put the sub above in VBA module.
In your Macro.xlsm active sheet, fill:
cell A2 with D:\test\
cell B2 with 1.xls
cell C2 with Sheet1
cell A3 with D:\test\
cell B3 with 2.xls
cell C3 with 1-Sheet1
cell D3 with A1:F1000
something like this :
EXCEL_2022-06-21_20-26-42.png
Make sure that the data in 1.xls and 2.xls is the same with the one you attached in your post.
Make sure that 1.xls and 2.xls are not open, then run the macro.
It will open 1.xls and it directly fill column D and E in sheet1 with vlookup formula looking to 2.xls 1-Sheet1 range A1:F1000
Bookmarks