VLOOKUP numbers as #N/A - slowly losing the will....

P

Potsy

Hi

Having a few issues with VLOOKUP, basically if Part Numbers (ColumnD)
contains text and numbers it is okay, hoever, rows that just contain
numbers only or numbers and slashes or dots are showing as #N/A in
ColumnE, have searched on here (http://www.contextures.com/
xlFunctions02.html) and tried looking at following but does not seem
to work. any help appreciated!!!

Here is formula currently:

=VLOOKUP(D2,CommodityCode,4)

'CommodityCode' is named Range on another sheet in same workbook

Here are results for column D and E respectively:

Part Number Commodity
GW Small Power
GU7271BSS Small Power
1000/8 #N/A
E3PP158 Mains Distribution
GW Small Power
2035.802 #N/A
8002.01 #N/A
GU7271BSS Small Power
010-100-100-08 #N/A
7027 #N/A
LMA10 Lighting

Any help appecated!!!

Potsy
 
G

Guest

I get this to work for all of your examples by using this formula:
=VLOOKUP(A2,$I$1:$J$9,2,FALSE).

Two things to always make sure of with vlookups:

1. make sure your range is sorted by the index column (that is make sure
your "Commodity Code" range is sorted by its first column.

2. Use the last option argument "false" to make sure you are getting exact
matches.

My test
In cells A1 to C4:

Part Number
GW b
1000/8 a
8002.01 c

in cells I1 to J:3

8002.01 c
1000/8 a
GW b



Note that when excel sorts them, 8002.01 (a number) comes before 1000/8 (a
string).
 
P

Potsy

I get this to work for all of your examples by using this formula:
=VLOOKUP(A2,$I$1:$J$9,2,FALSE).

Two things to always make sure of with vlookups:

1. make sure your range is sorted by the index column (that is make sure
your "Commodity Code" range is sorted by its first column.

2. Use the last option argument "false" to make sure you are getting exact
matches.

My test
In cells A1 to C4:

Part Number
GW b
1000/8 a
8002.01 c

in cells I1 to J:3

8002.01 c
1000/8 a
GW b

Note that when excel sorts them, 8002.01 (a number) comes before 1000/8 (a
string).











- Show quoted text -

sorry cannot seem to get to work can I send file?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top