**We’ve covered more vlookup problems than any other site on the internet**

**vlookup #N/A error? There are FIVE different #N/A errors and two different #REF errors explained below, as well as others such as the “Invalid reference” error. If you experience a different #N/A or #REF error to the ones listed below, then tell us. We’ve discovered new errors as a result of engaging with site visitors. But please check the solutions listed below first!
**

This page assumes you already know how to do a vlookup – if you don’t know how to, click here for the link to the 2007/2010/2013/2016 tutorial or here for the 2003 tutorial. The file with the data for the tutorials is here – once you’ve done a vlookup in column D as explained in the tutorials, you can replicate the problems below, if you wish. You can also just review the list below to find the problem you are experiencing.

- vlookup number stored as text (#N/A error)
- vlookup trailing spaces error AKA “the invisible dash!” (another #N/A error)
- vlookup #N/A error (because wrong range of data is selected)
- vlookup #N/A error (because data is missing from table)
- vlookup #N/A error because wrong ‘lookup value’ is used in the formula
- vlookup #REF! error because data is missing
- vlookup #REF error because table array is incorrect
- vlookup working for some cells but not others
- vlookup not working – just showing formula.
- Sum of sales data not working because some vlookups are returning N/As
- #NAME error – because of incomplete ‘argument’ in the formula
- vlookup not working when using a 2007 (or 2010) Excel file and you’re looking up data from an Excel 2003 file (or vice versa).
- vlookup invalid error / vlookup invalid reference error

#### 1) vlookup number stored as text (#N/A error)

This is a formatting error that is very easy to fix!

If you get an “N/A#” error and there is an exclamation mark next to the unique value used for your vlookup (see cell B2 in the screenshot below) then you simply have to click on the exclamation mark box the click on “Convert to Number.”

This will change the format of the cell from “Text” to “Number” and the vlookup should work. If it still doesn’t work, read on for other N/A errors covered on this page.

#### 2) vlookup trailing spaces error AKA “the invisible dash!” (another #N/A error)

Some company reporting systems automatically generate reports where each unique value in the report has a trailing space at the end, which causes the vlookup to fail. This is the most difficult “N/A#” error to spot if you’ve never come across it before, as everything “appears” to be normal to the naked eye!

The unique values in the table below are in column B (the positions of the runners). I’ve highlighted cell B2, which has the runner in position 1 – in the toolbar, where the number “1” is shown ABOVE column C, there is a trailing space at the end (see red arrow) which caused the vlookup to fail and create an “N/A#” error in column D.

There are a number of solutions for this:

2a) the “Data – ‘Text to Columns’” solution.

Go to “Data” in the tool bar, then click on the “Data” tab (it’s in between the “Formulas” and “Review” tabs).

Now – and this is an important step – highlight the column where your lookup values are. In the main example on this site, the lookup values are in column B.

Then click on the “Text to Columns” icon in the tool bar.

Click “Next” in the window that pops up (make sure you leave “Delimited” as the file type).

Click on the “Space” checkbox in the next window (see screenshot below). The “Treat consecutive delimiters as one” checkbox will automatically get ticket when you click on the “Space” checkbox. That is fine. Just click “Next” in the screenshot below. Then click on “Finish” and that’s it!

2b) take out the trailing space by clicking in the cell and pressing “backspace” at the end of the cell, to remove the blank space. However, this is time-consuming.

2c) click on the exclamation mark next to the cell then click “convert to number” – this is good, but it also a time-consuming solution.

2d) Use the “=int” formula as demonstrated in the screenshot below – using a blank column, enter the formula “=int(” then cell number that you need to fix, in this case, cell B2, then close the brackets – the complete formula will look like this

=int(B2)

Now double-click the bottom right hand-corner of this cell so that the formula is dragged down and then copy the column from the cell where you first entered the”=int()” formula in this screenshot this is cell E2; and then click cell B2 (the cell that needs to be fixed) and then click file / paste special / values – this will convert all the cells in column B to “integers” and at the same time remove the trailing spaces. Voila!

#### 3) vlookup #N/A error (because wrong range of data is selected)

Here’s a problem from someone who visited this site (and the solution, of course!)

Rather than use the method described, they’d started by typing “=vlookup….” and had selected an incorrect range of cells to look at.

They said they had doubts about the vlookup function and didn’t know how to use it properly.

They were getting an n/a error and didn’t know why! So I got them to send me the file available on this site to see what they’d done wrong. There were 5 N/A errors in their spreadsheet but I’ve left only one instance of the error in the file, to make it easier for you to understand why it happened.

The cell with the N/A error is cell D5 (see screenshot above). It has an “N/A” instead of the value “$700,000”. You can clearly see that Carl Lewis is in position 4 in both tables (left and right); and if you look at the table on the right, the Prize Money assigned to him is $700,000.

Here’s a link to the file with the error, in case you want to see it in closer detail – LINK TO FILE

The non-technical language explanation for this is that their vlookup formula was looking for a result for Carl Lewis in the BLUE AREA, when the result for Carl Lewis is in the YELLOW AREA ie ABOVE the BLUE AREA. (The vlookup was referencing the runner in position 4 but I have used the runner’s name as it’s quicker and easier to understand).

The technical explanation is this: the formula they created in cell D5 was this =VLOOKUP(B5,H5:J14,3,FALSE) where:

B5 is the runner in position 4 in the first table – which is ok (this is the lookup_value)

H5:J14 is the BLUE AREA – which is NOT ok (this is the TABLE ARRAY)

3 is the column reference – which is ok (this is the column_index_number)

FALSE – which is ok (this is called the Range Lookup but it’s simply the last part of the formula to complete the argument and ensure an exact match is returned, and if not found, then an “N/A” is returned.

There are two solutions for this:

either use SOLUTION 1 which is =VLOOKUP(B5,H:J,3,FALSE)

OR use SOLUTION 2 which is: =VLOOKUP(B5,$H$2:$J$11,3,FALSE)

With SOLUTION 1, we are just changing the cell selection for the TABLE ARRAY from H5:J14 to H:J ie take out the numbers! Putting the wrong numbers in the TABLE ARRAY part of the formula will cause an “N/A” error. In this case their formula started at cell H5 (which is position 8) but it is BELOW the area where the result they’re looking for (position 4) which is in the YELLOW AREA.

With SOLUTION 2, we are fixing the range of data from which the formula will search for a result. However, we cover all the “positions”, “runners” and “prize money” in the range. The visitor’s range was missing the $ signs and the cells H2 to J4.

So you can either highlight columns H to J in their entirety, as explained in the tutorials (see step 5 here: https://howtovlookupinexcel.com/) OR – highlight the range of cells of the data you’re referencing.

#### 4) vlookup #N/A error (because data is missing from table)

– this will happen either because the data you are looking up doesn’t exist (see table below where the numbers 1, 3 and 5 are not in the second table. You’ll notice that the ‘prize money for the runners in position 1, 3 and 5 in the first table is “N/A” instead of the actual value), so the formula returns an “N/A” instead of the result that you’re looking for.

– Or, alternatively, as above, the format of the data in your reference columns is ‘text’. You can fix this in one of two ways:

– i) the EASY way is to insert a column after your first reference column (so insert a column in between cells B and C, then type the following formula in cell C2:

=int(B2) then press ‘Enter’ (see screenshot below). After pressing ‘Enter’ drag down the formula so that all the cells in column B are made into ‘integers’ in column C. Now highlight the numbers in column C, copy them, then highlight the cells in column B and click ‘paste Special values’. Now delete column C, and your vlookup will work, like magic!!

– ii) the OTHER way is to change the format of each cell in col B to ‘general’, click ok, then press F2, then press Enter. (NB You must carry out those steps in exactly that order, otherwise they won’t work! Make sure after changing the format of the cell to ‘general’ and clicking ok, that you press F2 BEFORE pressing enter). However, with this method, you would have to do one cell at a time, which is time-consuming. I’m here to save you time!

#### 5) vlookup #N/A error because wrong ‘lookup value’ is used in the formula

In the formula in the screenshot below, you can see the formula

=VLOOKUP(M2,H:J,3,FALSE)

It has 4 different arguments which combined together create a vlookup:

=vlookup(lookup_value, table_array, col_index_num, [range_lookup])

However, the thing that’s wrong in this formula is the ‘lookup value’ – it is M2, when it should be B2. M2 is far away from both tables – see the cell highlighted in yellow. So simply changing M2 to B2 in this case will make the formula work ie the error is the first part of the formula, also known as the ‘lookup value’

#### 6) vlookup #REF! error

This will happen if the **file**, **spreadsheet** or **table array** that you were looking up data from has been deleted. An example of this is below, where I have deleted columns H to J and the vlookup described in the example above is returning the #REF! error.

#### 7) vlookup #REF error because table array is incorrect

In the screenshot below, the table array consists of 2 columns instead of 3 ie H to I instead of H to J.

The formula is trying to extract the “Prize Money” values in column J, so the formula needs to go up to column J to capture the information in that column!

Otherwise, the formula won’t work! Changing the letter I to J in this case will make the formula work.

#### 8) vlookup not working for some cells/vlookup not working sometimes

– if this happens, it is usually because your unique value is listed more than once in your reference table. And it would also have different values assigned to it. The screenshot below illustrates what I mean.

– The number “4” appears twice in column H in the table on the right hand side, so the vlookup formula returns the first value assigned to the number “4” in that table, which happens to be $10 (highlighted in red) in column J. If that row was deleted, then the vlookup would return the next value that it found assigned to the number “4” in that table, which would be $700,000 (highlighted in yellow at the bottom). In this example, $10 “Prize Money” is an unlikely amount for any athlete to get paid, as you can see all the other values are much higher, so the vlookup is returning the wrong result. To fix this, you would need to delete any duplicates that are irrelevant in your reference table.

– to find out if a value is a duplicate in a spreadsheet that you’re working on, copy your unique value from your first table, in this case “4” in column B on the left hand side, go to your reference table or the other data that you are looking up (table on the right hand side above) and press **ctrl+f** then paste your unique value in the field that comes up shown below. Click on “Find Next” and Excel will move to each row where it can find the number “4” whenever you click “Find Next”. If it appears in the table more than once, then you’re likely to find that your vlookup is returning the wrong data.

#### 9) vlookup not working – just showing formula.

If your vlookup isn’t working, and is returning the formula like this (see cell D2)

then you need to

– left click into the cell where the formula isn’t working

– right click and choose ‘format cells’

– you will notice that the current format is ‘text’

– change this to ‘general’

– click ok

– then press F2

– then press ENTER. You need to ensure you press F2 * before *pressing enter, otherwise this won’t work.

– after you’ve done that, the problem will be fixed and you can drag the formula down to other cells in the column, if necessary.

#### 10) sum of sales data not working because some vlookups are returning N/As:

You may have experienced a problem at work where you are analysing data, and you have a spreadsheet with vlookups and a ‘sum function/total value formula’ at the bottom of each column with the vlookups. However, your sum function may be returning the word “N/A” instead of a total value or an actual figure.

You can fix this by changing your vlookups so that if they don’t find a value, they return a “0” instead of an “N/A”. The sum function will usually not work if there are “N/As” in the column concerned.

I have added in an extra row here (with Donald Trump as runner) to illustrate the above problem.

To fix this, you need to add an IF statement to your vlookup. Let’s take the vlookup formula in cell D11 which currently looks like this: **=VLOOKUP(B12,H:J,3,FALSE)**

If you add the following text, the formula will return a “0” instead of an “NA”, and this will allow the sum function (=SUM(D2:D12)) in cell D13 to work. So just add these bits (I would suggest putting an apostrophe in front and writing this formula in a separate cell first):

**i) ****‘=IF(ISERROR**

ii) copy and paste your original vlookup straight after the above ie **(VLOOKUP(A2,I:M,5,FALSE)**

iii) add the following **),0,**

iv) then paste the original vlookup again **(VLOOKUP(A2,I:M,5,FALSE) **and add two brackets **))** at the end to finish the formula (if you then take out the apostrophe and paste the formula into cell D11, the vlookup will return the value “0” and your sum function//totals formula will work.

v) the revised formula will look like this: **=IF(ISERROR(VLOOKUP(A2,I:M,5,FALSE)),0,(VLOOKUP(A2,I:M,5,FALSE)))**

The above formula basically says “if there is an error with the vlookup, return the number “0”, and if there isn’t an error, then return the value that the vlookup is looking for.

**NEW UPDATE!!!**

There is an alternative and SHORTER version of the above formula which can be used in Excel 2007 onwards – thanks to one of our visitors (Joe).

It uses the **IFERROR** function.

We’d simply just take the original function that we have ie **(VLOOKUP(A2,I:M,5,FALSE)** and add the word “=**IFERROR**” at the beginning and “**,0)**” at the end so it would look like this:

**=IFERROR(VLOOKUP(A2,I:M,5,FALSE),0)**

#### Less common but very annoying vlookup problems (when you don’t know the solution)

#### 11) #NAME error – because of incomplete ‘argument’ in the formula

In the example above, everything in the formula is fine except for the last word, which is “fals” instead of “false” with an “e” at the end.

So if you’re using words in formulas, it’s important to spell them correctly, otherwise you’ll get an #N/A error.

#### 12) vlookup not working when using a 2007 (or 2010) Excel file and you’re looking up data from an Excel 2003 file (or vice versa).

– in the Excel 2007 or 2010 file (s) [NOT 2003], click on ‘file’ then ‘save as’ then in the ‘save as type’ drop down menu at the bottom of the ‘save as’ pop up window, change file type from ‘Excel workbook (*.xlsx)’ – see screenshot below – to ‘Excel 97-2003 Workbook (.xls)’. You will then get the error message shown below in the second screenshot below, at which point, you click ‘yes’. Your vlookup between the files will now work!

#### 13) vlookup invalid error / vlookup invalid reference error

– If you’re working with large spreadsheets, ie those that have over 65,000 rows, you’re likely to come across the “vlookup invalid error” – the “invalid” message appears next to the table array field (see screenshot below). If you complete the vlookup anyway, you’ll then get another error message (see second screenshot below) which says “Invalid reference. This file version can only have formulas that reference cells within a worksheet size of 256 columns (column IW or higher) or 65,000 rows.

The solution here is two-fold:

i) Ensure that if your table array has more than 65,000 rows, you put anything between rows 65,0001 to 130,000 in a separate sheet, then put anything from rows 130,001 to 195,000 in a separate sheet, and so on, in increments of 65,000, because that’s the maximum number of rows the vlookup function will look it.

ii) Ensure that rather than highlighting the columns (for your table array), you highlight the specific range of cells you’re looking up and “fix them” by pressing F4 – in the example on this site, the specific range for the table array would be cells H2 to J11 – you can see this by either downloading the spreadsheet – available at the top of the site; or simply looking at the screenshot in problem number 5 above.

Hope that’s solved all your problems! Have a nice day!

We ask that you take a moment to read our Terms and Conditions and Privacy Policies.

Hi, I am having trouble getting vlookup to work since I moved from my desktop to laptop.

I work on several excel sheets and have to use vlookup to get most of my work done – vlookup is now not working at all

Any idea why and how it can be fixed?

Hi, apologies for the delay in responding.

What kind of error are you getting? Is it any of the ones listed here? https://howtovlookupinexcel.com/13-common-problems-with-vlookups/

If not, if you re-create the error with sample (not confidential data), then send it to the email address you receive this response from, we can look into it for you?

Thank you very much! The above explanations helped me solve and understand VLOOKUPS much better! 🙂

Hi, I just saw your message!

But I’m glad that we were able to help!

Please let us know if you have any other questions.

Have an Excel file with several worksheets, one of which is a sheet used for lookup values.

The VLOOKUP works fine for all the rows except for one lookup value. ‘EC’. The value is the same type ‘Text’ in both the lookup table and the data table. I have many rows with this lookup value, and there is just the 1 column it refuses to retrieve the correct value ( same type in both worksheets ). All others are fine. Can you help. There are no errors, it just picks up the wrong value.

Hi

I’d first check whether the number of characters in both ‘EC’ cells is the same!

You could have a space in one of the cells, which could be throwing the vlookup off!

The best way to test this is do a count of the number of characters in both cells.

Here’s a quick way to do that – but you should obviously apply these formulae to the relevant cells in your sheet:

In the example below, I’ve got the characters ‘EC’ in cells A1 and A2, respectively. But cell A2 has a dash, at the end.

The cells look the same to the naked eye, but applying the formula =LEN(A1) in cell B2 shows that cell A1 has two characters.

But applying =LEN(A2) to cell B2 shows that cell A2 has THREE characters in it (because of the space at the end). Try that, and if there’s a difference remove the extra character in the cell with the extra character. If that doesn’t work, can you copy and paste the cells that aren’t working as ‘values’ in a separate sheet, then send an e-mail to the e-mail address that you get this response from, and I’ll look into it further. I’ll be offline for a few hours. But let me know if the first solution helps.

EC 2

EC 3

Hi I need help with Vlook

I noticed that the Vlook popup (no of column) pop all over the sheet. and its hard to find it in a large file.

do you have any idea how to put it in fix place? thanks!

Hi Fanny

If you have dozens of columns, the easiest thing to do would be to make a copy of the sheet you want to get the data from, then just keep the two columns you need for the vlookup to work.

You can also hide the columns you don’t need.

If you want to fix the range of columns you’re looking at, then you can use the alternative method described in Step 5 here: https://howtovlookupinexcel.com/

Let us know if you have any other questions.

Analyst

#9 solution = perfect.

Thank you very much.

You’re most welcome!

Glad we could help! Happy New Year when it comes around!

YESSSS THANK YOU FOR #9. I was so frustrated not knowing why it wont work!!!

You’re welcome!

It’s definitely a time-saver!

Glad we could help!

Hello,

*Please note, there is no box down here that says “notify me of follow-up comments via e-mail” which I would like to do. Can you please email me directly when this answer is available?*

I’m having issues with vlookup. I’ve been successful so far, but I’ve changed something that might be resulting in the “N/A” I’m receiving. Instead of referencing one cell to pull data from another Excel spreadsheet, I’m referencing two cells to pull data from another Excel spreadsheet (all within the same document.) I’ve seen this done previously, so I’m not understanding why it isn’t working for me.

I’m on worksheet1, trying to reference data from two separate cells that will give me my answer from a different sheet of the Excel document. There is a corresponding number in cell D49 and A70 on the same page, and I’m wanting to retrieve data from Column E that corresponds to those two numbers. I’m using the formula: =IF(VLOOKUP(A70&$D$49,worksheettwo!A4:E197,5,FALSE),0)

Any thoughts here?

Hi Chelsea

Looking at the formula you have, you’ve referenced a range (the table array which goes from cell A4 to E197), but haven’t locked it.

If you reference specific cells in a table array, you should always lock the cells by highlighting that range (A4 to E197 in this case) then pressing F4 – this will put $ in the right places, to lock the cells so they look like this: $A$4:$E$197

Otherwise, you can change the table array reference to A:E and the vlookup will instead search for the value you’re looking for in the whole of column E. This method is explained in the 5 min video on this page: https://howtovlookupinexcel.com/

Also, with the lookup values that you have (A70&$D49), I’d strongly advise against combining vlookup values in different rows, as when you drag down the formula, the value combinations are likely to be out of sync.

If you want to use two different cells for your lookup value, it’s better to have two consecutive columns where the lookup values are in the same row.

So if your lookup value is meant to be “AB”, you’d want the characters “A” and “B” to be in the same row (in consecutive columns), then have a formula in a third column adding the two values together.

So if A was in cell A1 and B was in cell B1, then you’d have a formula in C1 that read “=A1&B1”

You can then drag this formula down without worrying about any of the values being out of sync.

This would have to be to the left of your data, though, for it to work.

Otherwise, you’d have to use the index match formula.

Let me know if you want me to clarify anything. If the file you’re using does NOT contain confidential information, or you can create a dummy file, I’m happy to have a look at it for you.

Analyst