Use IFERROR to Replace Excel VLOOKUP Errors with Zero
Question details
Return zero when an Excel VLOOKUP formula cannot find a matching value.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants to update a VLOOKUP formula in M4 and apply it to other rows.
- Observed behavior
- The VLOOKUP formula returns #N/A when no matching value is found.
Select M4 and check the existing VLOOKUP formula in the formula bar. Confirm that the lookup table and return column are correct before wrapping the formula.
Wrap the Excel VLOOKUP Formula in IFERROR
Use IFERROR to return zero when VLOOKUP produces an error and keep the lookup result when it succeeds.
In Excel, select M4 and click the formula bar to edit the existing VLOOKUP formula.
Wrap the existing VLOOKUP in IFERROR and set the error result to zero. Use the pattern =IFERROR(VLOOKUP(lookup_value,table_array,column_index,FALSE),0), replacing the arguments with those from your formula.
Press Enter, then drag the fill handle from the bottom-right corner of M4 down the column. Check that the lookup table references remain correct; use absolute references such as $D$2:$E$100 if the table should stay fixed.

Replace VLOOKUP Errors with Zero in WPS Spreadsheets
Open your workbook in WPS Spreadsheets and wrap the VLOOKUP formula in IFERROR to return zero when the lookup produces an error.
- 1. Open the workbook: Open WPS Spreadsheets, select Open, and choose your Excel workbook.
- 2. Edit the lookup formula: Select the cell containing VLOOKUP and click the formula bar. Wrap the existing formula as =IFERROR(VLOOKUP(lookup_value,table_array,column_index,FALSE),0), using your actual lookup arguments.
- 3. Fill and save: Press Enter, drag the cell's fill handle down to apply the formula to other rows, and use File > Save to save the workbook.

Frequently Asked Questions
Does IFERROR replace only #N/A errors?
No. IFERROR returns zero for any error produced by the wrapped formula, including #REF! and #VALUE!. Use =IFNA(VLOOKUP(...),0) if you only want to replace #N/A.
What happens when VLOOKUP finds a match?
IFERROR returns the value from VLOOKUP unchanged. The zero appears only when the wrapped formula produces an error.
Why does my formula change when I fill it down?
Relative references adjust for each row. To keep the lookup table fixed, edit the formula in the formula bar and use absolute references such as $D$2:$E$100 for the table array.
Why use FALSE in the VLOOKUP formula?
FALSE requests an exact match. If no exact match is found, VLOOKUP returns #N/A, which IFERROR can replace with zero.




