17

I would like to use a VLOOKUP function referring to a data table placed in a different sheet from the one where the VLOOKUP function in written.

Example: in Sheet 1, cell AA3 I would like to insert the VLOOKUP function. I want the function to check the number in cell M3, find the same number in Sheet 2 range address A2:Q47 first column, and reproduce the value in the 13th column of that table.

I've written this function but it reports #N/A as a result:

=VLOOKUP(M3,Sheet1!$A$2:$Q$47,13,FALSE)
BiscuitBaker
  • 1,421
  • 3
  • 23
  • 37
Gianluca
  • 6,307
  • 19
  • 44
  • 65

7 Answers7

21

One of the common problems with VLOOKUP is "data mismatch" where #N/A is returned because a numeric lookup value doesn't match a text-formatted value in the VLOOKUP table (or vice versa)

Does either of these versions work?

=VLOOKUP(M3&"",Sheet1!$A$2:$Q$47,13,FALSE)

or

=VLOOKUP(M3+0,Sheet1!$A$2:$Q$47,13,FALSE)

The former converts a numeric lookup value to text (assuming that lookup table 1st column contains numbers formatted as text). The latter does the reverse, changing a text-formatted lookup value to a number.

Depending on which one works (assuming one does) then you may want to permanently change the format of your data so that the standard VLOOKUP will work

barry houdini
  • 45,615
  • 8
  • 63
  • 81
  • 3
    +1 for the neat trick for coercing the data type in the lookup value from text to number, or vice versa! – chuff Feb 26 '13 at 05:30
4

I faced this problem and when i started searching the important point i found is, the value u are looking up i.e M3 column should be present in the first column of the table u want to search https://support.office.com/en-us/article/VLOOKUP-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1 check in lookup_value

Vishruth
  • 41
  • 1
0

Your formula looks fine. Maybe the value you are looking for is not in the first column of the second table?

If the second sheet is in another workbook, you need to add a Workbook reference to your formula:

=VLOOKUP(M3,[Book1]Sheet1!$A$2:$Q$47,13,FALSE)
chuff
  • 5,846
  • 1
  • 21
  • 26
0

There might be something wrong with your formula if you are looking from another sheet maybe you have to change Sheet1 to Sheet2 ---> =VLOOKUP(M3,Sheet2!$A$2:$Q$47,13,FALSE) --- Where Sheet2 is your table array

Jong
  • 1
0

This lookup only features exact matches. If you have an extra space in one of the columns or something similar it will not recognize it.

Colin
  • 1
0

I have faced similar problem and it was returning #N/A. That means matching data is present but you might having extra space in the M3 column record, that may prevent it from getting exact value. Because you have set last parameter as FALSE, it is looking for "exact match". This formula is correct: =VLOOKUP(M3,Sheet1!$A$2:$Q$47,13,FALSE)

Yaron Schwimmer
  • 5,327
  • 5
  • 36
  • 59
-1

Copy =VLOOKUP(M3,A$2:Q$47,13,FALSE) to other sheets, then search for ! replace by !$, search for : replace by :$ one time for all sheets

WOUNDEDStevenJones
  • 5,150
  • 6
  • 41
  • 53