vlookup #n/a workaround

MN_Excel

Board Regular
Joined
Nov 8, 2010
Messages
153
I rrently have a spreadsheet where cell A1 contains "1234 abc". I want to isolate the first part of the value in cell B1 so I did a "left" function to get B1 to display "1234." However, I am now attempting to do a vlookup on 1234 and it keeps coming back as #n/a. I'm thinking it is due to the fact that B1 contains a formula, and not a value b/c when I do a copy/paste special values and then convert to number the vlookup works. Any ideas on a workaround that won't require me to do a paste/special values?

Thanks in advance for any help!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
LEFT returns text. You need to convert to a number by one of the following:
=LEFT(A1,4)+0
=LEFT(A1,4)*1
=--LEFT(A1,4)
 
Upvote 0
I think the problem is that when you did the left function it is text and your vlookup array is numeric. You'll have to convert 1234 into a number. That is my best guess right now.

You can test the cell contents with =isnumber(B1). if it comes back true its a number not text.
 
Upvote 0
I rrently have a spreadsheet where cell A1 contains "1234 abc". I want to isolate the first part of the value in cell B1 so I did a "left" function to get B1 to display "1234." However, I am now attempting to do a vlookup on 1234 and it keeps coming back as #n/a. I'm thinking it is due to the fact that B1 contains a formula, and not a value b/c when I do a copy/paste special values and then convert to number the vlookup works. Any ideas on a workaround that won't require me to do a paste/special values?

Thanks in advance for any help!

=VALUE(LEFT(A1,4)) should do the trick
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,844
Members
452,948
Latest member
UsmanAli786

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