relative reference contents of a range

G

Gena

I have a vlookup formula that works as I want it to:
=VLOOKUP(B2,TaurusPricing,7,0)

"TaurusPricing" references a range of cells, B23-H33 of
tab "Pricing"

What I would like to do is replace "TaurusPricing" in my
vlookup formula to be a relative reference to cell O2,
which reads "TaurusPricing".

So I tried the following:
=VLOOKUP(B2,O2,7,0)
which results in an #NA error.

How can I replace "TaurusPricing" with a reference to the
contents of cell O2?
 
A

Andy

Gena

You'll have to use the INDIRECT function, which tells Excel to use the value
of the cell rather than the cell

=VLOOKUP(B2,INDIRECT(O2),7,0)
should do the trick

Andy
 

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