How to use vlookup for two different excel file?

@suraj_gaikwad

You can pass the file name dynamically in a variable like below

FileName="Excel2.xlsx"
"=VLOOKUP(B2,[" + FileName + "]Sheet1!$B:$B,1,0)"

Excel1:(Input)

image

Excel2:(Input)

image

Excel1:(Output)

Cheers!!