SOLVED

How to make a cell to reference a range name in vlookup formula

Copper Contributor

I'm trying to create a vlookup formula that uses a cell reference that contains the name of a cell range.

 

CarlMatDi_0-1590511854943.png

Cell A3 contains the name of a cell range "MOVIL".  In cell D3 I entered a formula that looks for a value, but that value depends of the range named in A3 (there are 3 other range names).  The Vlookup formula in D3 is: =IFNA(IFERROR(ROUND($C3*VLOOKUP($B3,"A3",4,FALSE),2),VLOOKUP($B3,"A3",4,FALSE)),"").  The problem is that vlookup does not understand that A3 contains the name of a range.  I tried also without "".

 

Can you help me fix this formula??

 

 

7 Replies

@CarlMatDi 

Instead of 

,"A3",

you need

,INDIRECT(A3),

@CarlMatDi , This should work, using INDIRECT function as shown :-

 

amit_bhola_0-1590514580877.png

 

@Peter Bartholomew 

Hi and thanks,

 

but when I changed using INDIRECT a #REF! error resulted:

I'm including the screenshot of the Name Manager.

 

CarlMatDi_0-1590515112581.png

 

@amit_bhola 

Thanks, but when I use INDIRECT a receive a #REF! error.

 

 

CarlMatDi_0-1590515240398.png

 

A detail that I didn't mentioned before is that A3 value was filled using a drop down list that I defined using the data validation window.

best response confirmed by CarlMatDi (Copper Contributor)
Solution

@CarlMatDi , your named range is referring to only one column A3 to A500 (=>excel knows about only one column), but you are mentioning 4 in the Vlookup formula , so excel cannot recognize the 4th column, that is why it is returni ng #REF error

 

For Vlookup to return the value on 4th column starting from column A, your named range should be something like =Movil!$A$3:$D$500   

 

Thank you!! That was the issue!
I didn't notice.
1 best response

Accepted Solutions
best response confirmed by CarlMatDi (Copper Contributor)
Solution

@CarlMatDi , your named range is referring to only one column A3 to A500 (=>excel knows about only one column), but you are mentioning 4 in the Vlookup formula , so excel cannot recognize the 4th column, that is why it is returni ng #REF error

 

For Vlookup to return the value on 4th column starting from column A, your named range should be something like =Movil!$A$3:$D$500   

 

View solution in original post