To use the ISERROR function with VLOOKUP, you wrap the VLOOKUP formula inside an IF statement and an ISERROR check: =IF(ISERROR(VLOOKUP(lookup_value, table_array, col_index, [range_lookup])), "Value if Error", VLOOKUP(lookup_value, table_array, col_index, [range_lookup])). This achieves a clean spreadsheet by replacing the unsightly #N/A or #REF! errors—which occur when VLOOKUP cannot find a match—with a custom message like "Not Found," a zero, or a blank cell.

What You'll Need

  • Microsoft Excel (any version from 2003 onwards).
  • A data table containing the information you want to retrieve (the source table).
  • A lookup value (the unique identifier you are searching for).
  • A basic understanding of how VLOOKUP works on its own.

Step-by-Step

  1. Prepare Your Data: Ensure your source data is organized in a table where the unique identifier (the value you are searching for) is in the leftmost column. For example, if you are looking up a customer's email by their Customer ID, the Customer ID must be the first column of your selected range.
  2. Write Your Basic VLOOKUP: Before adding the error handling, write a standard VLOOKUP to ensure it works. For example: =VLOOKUP(A2, Sheet2!A:B, 2, FALSE). If the value in A2 exists in Sheet2, you will see the result. If it does not, Excel will display #N/A.
  3. Apply the ISERROR Wrapper: To check if that formula results in an error, wrap it in the ISERROR function. Type =ISERROR(VLOOKUP(A2, Sheet2!A:B, 2, FALSE)). Now, instead of the actual data, Excel will return TRUE if the value is missing (an error occurred) and FALSE if the value was found successfully.
  4. Integrate the IF Statement: Since a TRUE/FALSE result isn't useful for a final report, use the IF function to tell Excel what to display based on that result. The structure is: =IF(Logical_Test, Value_if_True, Value_if_False).
  5. Define the "Value if True" (The Error Message): In the second part of the IF statement, decide what should appear when ISERROR is TRUE. If you want it to say "Missing," put it in quotes: =IF(ISERROR(VLOOKUP(A2, Sheet2!A:B, 2, FALSE)), "Missing", ... ). If you want a blank cell, use two double quotes "".
  6. Define the "Value if False" (The Actual Result): The final part of the IF statement is what happens if there is NO error. In this case, you want the actual VLOOKUP result. You must repeat the VLOOKUP formula here: =IF(ISERROR(VLOOKUP(A2, Sheet2!A:B, 2, FALSE)), "Missing", VLOOKUP(A2, Sheet2!A:B, 2, FALSE)).
  7. Execute and Fill: Press Enter to complete the formula. Click the bottom-right corner of the cell (the fill handle) and drag it down to apply the logic to the rest of your column.

Common Mistakes

One of the most frequent errors is forgetting to repeat the VLOOKUP formula in the "Value if False" section of the IF statement. Beginners often assume that because they already wrote the VLOOKUP inside the ISERROR check, Excel "remembers" the result. However, ISERROR only returns a TRUE or FALSE; it does not store the data. If you omit the second VLOOKUP, your formula will return the error message even when the data is actually found, or it will simply return FALSE.

Another common mistake is neglecting the FALSE (or 0) argument at the end of the VLOOKUP function. If you leave this blank or set it to TRUE, Excel performs an approximate match. This can lead to ISERROR returning FALSE (meaning "no error") even when the result is wrong, because Excel found a value that was "close enough" to your lookup value. Always use FALSE for exact matches when handling errors for unique IDs.

Users also frequently forget to use absolute references (dollar signs) for their table arrays. If your formula is VLOOKUP(A2, B2:C100, 2, FALSE) and you drag it down, the range will shift to B3:C101, B4:C102, and so on. This causes the VLOOKUP to "miss" data that is actually there, triggering the ISERROR function and displaying your error message incorrectly. Use $B$2:$C$100 to lock the range.

Tips

If you are using a modern version of Excel (2013 or later), consider using IFERROR instead of IF(ISERROR()). The IFERROR function is a streamlined version that does the same thing but requires you to write the VLOOKUP only once. The syntax is =IFERROR(VLOOKUP(...), "Error Message"). This makes the formula shorter, easier to read, and slightly faster for Excel to calculate in very large spreadsheets.

To make your spreadsheets more dynamic, instead of typing "Missing" directly into the formula, reference a cell that contains your desired error message. For example, =IF(ISERROR(VLOOKUP(...)), $Z$1, VLOOKUP(...)). This allows you to change the error message for the entire sheet by editing a single cell (Z1) rather than editing hundreds of individual formulas.

For financial reports, it is often better to return a 0 instead of text. To do this, simply remove the quotation marks from the "Value if True" section. For example: =IF(ISERROR(VLOOKUP(...)), 0, VLOOKUP(...)). This ensures that the column remains numeric, allowing you to use SUM or AVERAGE functions on the resulting data without triggering a #VALUE! error.

Troubleshooting

If your formula is returning the "Error Message" even though you can clearly see the value exists in your source table, check for data type mismatches. This is the most common cause of VLOOKUP failure. If your lookup value is stored as text (indicated by a small green triangle in the corner) but the source table stores the IDs as numbers, VLOOKUP will not see them as a match. To fix this, select the column, go to the Data tab, select Text to Columns, and click Finish to force the data into a consistent format.

If you see a #NAME? error, it usually means there is a typo in the function names. Check that you haven't typed "ISERRORS" (with an extra S) or "VLOOKUPP". Ensure that all quotes used for text are standard double quotes (") and not "smart quotes" copied from a word processor, which Excel does not recognize as formula delimiters.

If the formula returns #REF!, it means your column index number is larger than the number of columns in your selected range. For example, if your table array is A:B (2 columns) but your col_index_num is 3, Excel cannot find a third column. Adjust the range to include the necessary columns or lower the index number.

Frequently Asked Questions

What is the difference between ISERROR and ISNA?

ISERROR catches every type of error, including #N/A, #VALUE!, #REF!, #DIV/0!, and #NUM!. ISNA only catches the #N/A error, which specifically means "Value Not Available." For VLOOKUP, ISNA is often safer because it only hides missing data, while still alerting you if your formula is broken (e.g., a #REF! error caused by a deleted column).

Can I use this to return a blank cell?

Yes. In the "Value if True" section of the IF statement, use two double quotes with nothing between them: "". This tells Excel to return an empty string, making the cell appear blank to the user.

Does ISERROR slow down my workbook?

In very large workbooks (tens of thousands of rows), using IF(ISERROR(VLOOKUP(...), VLOOKUP(...)) can slow down performance because Excel has to perform the VLOOKUP calculation twice for every successful match. Using IFERROR or XLOOKUP (in Office 365) is more efficient.

Why does my VLOOKUP return the wrong value despite no error?

This usually happens because the fourth argument (range_lookup) is omitted or set to TRUE. When set to TRUE, Excel looks for the nearest approximate match. Ensure you use FALSE to force an exact match, which ensures that ISERROR only triggers when the value is truly missing.

Can I nest multiple VLOOKUPs with ISERROR?

Yes. This is a powerful way to search multiple tables. You can wrap one VLOOKUP in an ISERROR, and in the "Value if True" section, place another VLOOKUP searching a second table. This allows Excel to check Table A, and if the value isn't there, check Table B before finally returning an error message.