Why?

dantheram

Board Regular
Joined
Aug 27, 2010
Messages
192
Office Version
  1. 365
Platform
  1. Windows
I have set up a vlookup as follows;- vlookup($A15,A3:A5,1,FALSE)

the problem lies with the lookup value, A15, this cell is not a value, it is a formula which returns a value i.e =c5 (c5 being the value i want to look up).

How do i tell vlookup to ignore the formula and use the returned value?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
You don't need to tell vlookup that, it does it automatically. There must be some other error going on. Like numbers stored as text, etc etc.
 
Upvote 0
i thought so, but if i write in the value manually it works, if i leave the formula it doesn't.
 
Upvote 0
And what is the value? Does it seem to be numeric? Or is it text? If text, have you checked for trailing spaces?
 
Upvote 0
I have set up a vlookup as follows;- vlookup($A15,A3:A5,1,FALSE)

the problem lies with the lookup value, A15, this cell is not a value, it is a formula which returns a value i.e =c5 (c5 being the value i want to look up).

How do i tell vlookup to ignore the formula and use the returned value?
The VLOOKUP doesn't evaluate the formula in A15, it "sees" the value returned by that formula.

Here's another way to do what you're trying to do:

=IF(COUNTIF(A3:A5,A15),A15,"Not Found")
 
Upvote 0
Then I would think the value in C5 is not EXACTLY what you think it is...

Is it a number or a text value?

If it's a number, then it's probalby a "number stored as text"

Try changing the formula in A1 from
=C5
to
=C5+0
 
Upvote 0
this is very bizarre now.

the lookup is working except it wont return 1 of the 3 possible values.

for example, Red, white, blue are all in the table array.

red and blue are returned fine but white = #N/A
 
Upvote 0
Check for trailing spaces in either the table or the test value.
 
Upvote 0
none in any values, i just dont understand why it works fine for 2 and not the 3rd

Apologies, you're right their was a space, all is working now.

Many thanks for everyones input.

Dan
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,136
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top