Search code examples
excelexcel-formulaexcel-2010vlookupalphanumeric

VLOOKUP with Alphanumeric codes Failing even though they are equal


What I'm trying to do is use VLOOKUP to search through for an Alphanumeric serial number in a range of data in another sheet. However, it does not seem to be recognizing that there is a match when I know for a fact that there is and that they are formatted exactly the same.

The values I'm working with look like this: FTX1724R3W2

I've ran a =A1=B2 function and it returns TRUE. I've copied and pasted one to the other to make sure that the formatting is the same, yet it still returns a #N/A. Using MATCH returns a FALSE as well.

I'm not sure what's going on, do I need to specially format the Alphanumeric codes so that they are "searchable"?

Here is the VLOOKUP that I was using...

=VLOOKUP(L2498, Inventory_List!$A$1:$D$2176, 1, FALSE)

My final goal is that it finds it in the other sheet and returns the value in the first indexed column, which is the name of the inventory object.


Solution

  • VLOOKUP() searches the first column of the indicated range. For the function to be effective, have the serial number column be the leftmost column of your search range.

    From Microsoft:

    VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)

    Lookup_value The value to search in the first column of the table array. Lookup_value can be a value or a reference. If lookup_value is smaller than the smallest value in the first column of table_array, VLOOKUP returns the #N/A error value.

    Table_array Two or more columns of data. Use a reference to a range or a range name. The values in the first column of table_array are the values searched by lookup_value. These values can be text, numbers, or logical values. Uppercase and lowercase text are equivalent.

    Col_index_num The column number in table_array from which the matching value must be returned. A col_index_num of 1 returns the value in the first column in table_array; a col_index_num of 2 returns the value in the second column in table_array, and so on.