Home » excel » excel – using filename in vlookup

excel – using filename in vlookup

Posted by: admin May 14, 2020 Leave a comment


I am trying to find a non-vba solution for getting a value via vlookup. The vlookup should use the sheet name as the search criteria. The sheet name format is “00000”


when writing “12345” into Cell N1 it work perfectly fine
when writing in Cell N1:

=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]", CELL

the Cell returns also “12345” but VLOOKUP does not work anymore.

Why is this different to straight putting a value into the Cell?
How do I solve this?

Wrapping VALUE() around MID()

How to&Answers:

If you want to reference the location that is generated from string you should use INDIRECT() like this:


This will return values from the range in desired sheets.