Vlookup with file name change daily

sbrmmd

New Member
Joined
Jan 18, 2018
Messages
3
Please can someone help me,

I have 2 files with the name of
Schedule Jan 16, 2018 Test.xlsx
and other is
Report 16012018.xlsx

I want to do Vlookup in the file 1 and to take the name of file 2 to get the information I required from the cell.

Please see my formula

VLOOKUP(L10,'G:\SS\Box\P Schedule\January 2018\[Report 16012018.xlsx]Sheet1'!$B:$Q,3,FALSE)

The reason is that each day the file name is change to next date. I want to put in the reference cell file name and do vlookup using the file name in that cell.

Please let me know if you required more information.

Syed
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
You will need to use indirect. Note indirect requires that the file be open, in your example Report 16012018 would have to be open or you will get a REF error.

where A1 has the file name, Report 16012018
Code:
[FONT=Helvetica][COLOR=#252c2f]VLOOKUP(L10,INDIRECT("'G:\SS\Box\P Schedule\January 2018\["&A1&".xlsx]Sheet1'!$B:$Q"),3,FALSE)[/COLOR][/FONT]
 
Upvote 0
You will need to use indirect. Note indirect requires that the file be open, in your example Report 16012018 would have to be open or you will get a REF error.

where A1 has the file name, Report 16012018
Code:
[FONT=Helvetica][COLOR=#252c2f]VLOOKUP(L10,INDIRECT("'G:\SS\Box\P Schedule\January 2018\["&A1&".xlsx]Sheet1'!$B:$Q"),3,FALSE)[/COLOR][/FONT]


Thank you for your reply,
but I am getting an error
#REF!
[TABLE="width: 73"]
<colgroup><col></colgroup><tbody>[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I opened the file but still getting this error, any suggestions
 
Upvote 0
Make sure that the cell with the file name is the same as the filename, no extra spaces or anything.
 
Upvote 0
Make sure that the cell with the file name is the same as the filename, no extra spaces or anything.

Yes, I copy paste the name of the file, one thing, my file is in share folder, and the address of the file is G:\SS\Box\P Schedule\January 2018\[20180017.xlsx]sheet1, if my file name is 20180117.xlsx.

I try to put the file on my Desktop, and change the location in the formula, but still the same error.

[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, bgcolor: transparent"]
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, bgcolor: transparent"][TABLE="width: 448"]
<colgroup><col width="64" style="width:48pt" span="7"> </colgroup><tbody>[TR]
[TD="width: 64, bgcolor: transparent"]
[/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
<strike></strike>
 
Upvote 0
make sure you got everything need to reference the file inducing the first '.
This is what is inside the quotes in the indirect formula
Code:
[COLOR=#252C2F][FONT=Helvetica][I]'G:\SS\Box\P Schedule\January 2018\["&A1&".xlsx]Sheet1'!$B:$Q[/I][/FONT][/COLOR]
 
Upvote 0

Forum statistics

Threads
1,223,959
Messages
6,175,644
Members
452,663
Latest member
MEMEH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top