How to replace sheet name in a formula?

G

Guest

Hi,
How to replace sheet name in a formula?
Say, I have 3 sheets named Sheet A, Sheet B, and Sheet C.
D5 contents a formula VLOOKUP(A5,'Sheet A'!$B$7:$F$36,2,FALSE). If I type
"Sheet B" in A1, "Sheet A" in the formula is replaced automatically by A1
content.

thanks
js
 
P

papou

Hello

=VLOOKUP(A5,INDIRECT("'"&A1&"'!$B$7:$F$36",TRUE),2,FALSE)

HTH
Cordially
Pascal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top