range label works in VLOOKUP except if refenced in another cell

  • Thread starter Thread starter brewmaker
  • Start date Start date
B

brewmaker

I'm getting N/A message in VLOOKUP formula if I reference a range name in
another cell. I setup the range name and formula correctly becuase it works
when I enter the range name directly into the formula.

For example:
=VLOOKUP(G2,MS344,E2) returns the correct results. MS344 is my range name.
The cells G2 & E2 feed values into the formula.

=VLOOKUP(G2,F2,E2) returns #N/A. Cell F2 contains the range name MS344.
I tried formatting cell F2 different ways and changing relative cell
references to absolute references. Nothing works, suggestions appreciated.
 
Try it like this:

=VLOOKUP(G2,INDIRECT(F2),E2)

If MS344 is a dynamic range defined with functions like OFFSET then the
above won't work.
 
Yes, your advice worked. Many thanks!!

T. Valko said:
Try it like this:

=VLOOKUP(G2,INDIRECT(F2),E2)

If MS344 is a dynamic range defined with functions like OFFSET then the
above won't work.
 
Back
Top