Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vlookup

Status
Not open for further replies.

Lodebo

Programmer
Nov 14, 2015
7
BE
Hi,

I'm using this vlookup function :

=VLookup(B6;[KW49_benodigd.xlsx]Mstock_grondstoffen!$B$22:$AD$84;29;False)

As you can see "KW49" is a part of the worksheetname
How can i replace "KW49" by a cell value ?

Best regards,
L.
 
use function INDIRECT()

so your formula would look like
«VLOOKUP(B6,INDIRECT("["&$F$1&"_benodigd.xlsx]Mstock_grondstoffen!$B$22:$AD$84",29,FALSE)

where $F$1 is a cell containing the prefix of the other worksheet


see working example a

also look at using INDEX + MATCH as it may behave better
Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top