Using cell contents in Vlookup formula

R

Rob

Hi,

I have the formula =VLOOKUP(B4,'September 2009'!database,2,0) which works
okay except I want the formula to read the month and year from an adjacent
cell. I thought the new formula should look something like
=VLOOKUP(B4,indirect(C4)!database,2,0) where cell C4 contains the text
September 2009.

Tried all sorts of formula but each returns either #REF! or #VALUE!

Any help would be much appreciated.

Rob
 
P

Pete_UK

You need to build up the complete reference within INDIRECT, like so:

=VLOOKUP(B4,INDIRECT("'"&C4&"'!database"),2,0)

where C4 is assumed to contain September 2009.

Note the apostrophes - one inside the "" and one immediately before
the !

Hope this helps.

Pete
 
R

Rob

Thanks Pete, worked a treat.
Rob

You need to build up the complete reference within INDIRECT, like so:

=VLOOKUP(B4,INDIRECT("'"&C4&"'!database"),2,0)

where C4 is assumed to contain September 2009.

Note the apostrophes - one inside the "" and one immediately before
the !

Hope this helps.

Pete
 

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