What to Do if You’re Getting a #REF Error with VLOOKUP

The VLOOKUP is one of the most popular functions in Excel. However, there can be many errors while using this function. In this tutorial, we will learn what to do if you’re getting a #REF! error with VLOOKUP. This error appears when data is missing or when we use a wrong table in the function. We will explain in detail and with examples both cases.

#REF! Error because VLOOKUP table is missing

#REF! Error can appear if we have deleted a table in which we are looking up for the data. It can also appear if we have deleted a Worksheet or a Workbook which contains this table.

Let’s first look at the working example of the VLOOKUP function.

Figure 1. The working example of the VLOOKUP function

As we can see in the picture, we have VLOOKUP formula in the cell F3. The purpose is to get the Sales value for Product B from the table in the range B2:C7. Our lookup columns is “Product” column. As the Sales is $500, we got that value in the cell F3.

Now we will see what happens if we delete the table in which we’re looking up (B2:C7).

Figure 2. The #REF! Error of the VLOOKUP function

In this example, we deleted columns containing our VLOOKUP table (B2:C7), but the formula remained the same. Now the formula from the cell F3 moved to the cell D3 as we deleted two columns. As you can see we got #REF! Error, as the formula didn’t manage to find the lookup table. Also, if we look at the formula, we will see that table is no longer $B3:$C$7, instead #REF!

Now we know what to check first when we get #REF! Error. This cause is especially often when we are referencing a table in another worksheet or workbook. If someone deletes them, we will get this error.

#REF! Error because VLOOKUP table is incomplete

#REF! Error can also appear if passed an incomplete table as a parameter to the VLOOKUP function. Usually, a user omits a column which needs to be retrieved.

We will again first look at the working example of the VLOOKUP function:

Figure 3. The working example of the VLOOKUP function

Similarly to the first example, we have VLOOKUP formula in the cell G3. The purpose is to get the Sales value for Product B from the table in the range B2:D7. As the Sales is $500, we got that value in the cell G3.

Now we will see what happens if we pass table B2:C7 by mistake, instead of B2:D7. If we do that, we omit the column which value we want to retrieve (D).

Figure 4. The #REF! Error of the VLOOKUP function

In this example, in the VLOOKUP formula, we put table $B$3:$C$7, instead of $B$3:$D$7. As we want to get the value from the third column of the table (“Sales”), which we omitted, the VLOOKUP function won’t be able to work. The output of the function is #REF! Error.

As we can see from the previous explanation, this is the second most possible cause of the error. We should check if we have selected the whole table in the VLOOKUP function.

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Our customers love us!
“The expert was absolutely amazing and stuck with me the whole way through. They were polite, patient, seemed to want to genuinely help me and provided a solution that I would never have managed otherwise. I could not be more thankful for their support and solution. Thank you!” - - Chris T, in California

Leave a Comment

avatar