VLOOKUP when the look up value is the output of a formula

original goose

New Member
Joined
Nov 14, 2007
Messages
5
I am running a VLOOKUP, my look up value is a number that is derived from the output of a formula. For some reason the VLOOKUP does not work when the look up value is derived this way. if I manually type in the number it works. It also works when the look up value is a letter, also derived from the output of a formula.

Any suggestions on how I can get this to work when the formula output is a number?

Thanks
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I works when I do it. Can you post your formula? I am thinking that you maybe have a "false" qualifier at the end of the Vlookup and that maybe ... just maybe ... Excel is adding in that trillionth of a decimal point to your formula that it does, and so you need to round your value.
 
Upvote 0
Here is the formula. I tried changing the false to true and still got the error

=VLOOKUP(F4,'Hoffman Numbers'!C6:D10,2,FALSE)
 
Upvote 0
Here is the formula. I tried changing the false to true and still got the error

=VLOOKUP(F4,'Hoffman Numbers'!C6:D10,2,FALSE)

You have probably a text-number in F4...

=VLOOKUP(F4+0,'Hoffman Numbers'!C6:D10,2,FALSE)

Care to post the formula that you have in F4?
 
Upvote 0
I have F4 formated as general, I have tried at as number as well.

Here is the formula for F4:

=G47

And here is the foumula is G47:

=MID($B47,6,2)

And finallly text string in B47
MIDBK2369UPPNXB

I realize I have an extra step involved with G47, I have removed it and still no luck

Thanks for your help
 
Upvote 0
The following formula...

=MID($B47,6,2)

...returns a text value. To coerce it into a numerical value, try the following instead...

=MID($B47,6,2)+0

Hope this helps!
 
Upvote 1
Aladin Akyurek
You have solved my problem. By addding a "+0" to the vlookup (=VLOOKUP(F4+0,'Hoffman Numbers'!C6:D10,2,FALSE) it solved the problem and retyrns the correct value.

BTW multiplying by 1 also works.

Do you know why this is the case?

At any rate thanks for your help.
 
Upvote 0
The MID function returns a text value. Since in this case the text value is a number, it can be coerced into a numerical value by any mathematical operation...

=F4+0

=F4*1

=F4/1

=F4^1

=F4*100

...and so on. And, of course, you can always coerce the originating formula, as I've shown in my previous post...

=MID($B47,6,2)+0

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,215,047
Messages
6,122,858
Members
449,096
Latest member
Erald

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