Make Excel VLOOKUP Return a Blank Instead of 0 or #N/A
Question details
The user needs to modify a VLOOKUP and MATCH formula so that it outputs a blank cell instead of displaying a 0 (when the source cell is empty) or an #N/A error (when no matching value is found).

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Pulling data using lookup functions where missing entries or empty source cells cause unwanted 0 values and error codes, disrupting the report's presentation.
- Observed behavior
- The current formula returns an #N/A error when a match is not found in the lookup array, and returns a 0 when the matching source cell contains no data.
Before modifying your formulas, ensure your dataset doesn't contain actual zero values (0) that you legitimately need to display, as these solutions will treat empty cells and zero values similarly.
Combine IF and IFERROR to Return a Blank Cell
Wrap your VLOOKUP formula in an IF statement to check for empty cells, and then wrap that entire formula in an IFERROR function to catch missing matches.
This is the most robust method for handling both #N/A errors and 0 values without altering the data type of the result. It evaluates the VLOOKUP result first to see if it is blank, and only returns the actual value if it contains data.
First, enclose your base VLOOKUP formula inside an IFERROR function. The syntax is =IFERROR(VLOOKUP(...), ""). This step ensures that if the lookup value doesn't exist, the cell remains blank instead of showing #N/A.
Next, use an IF function to test if the VLOOKUP evaluates to an empty string. The structure is =IF(VLOOKUP(...)="", "", VLOOKUP(...)). This replaces the 0 generated by an empty source cell with a blank.
Nest the IF statement inside the IFERROR. Your final formula will look like this: =IFERROR(IF(VLOOKUP(...)="", "", VLOOKUP(...)), ""). Press Enter to apply the formula.

Append an Empty String (For Text Values Only)
A quick formula trick that forces an empty cell to return a blank instead of 0 by appending an empty text string.
Handle Complex Lookup Formulas Effortlessly with WPS Spreadsheet
WPS Spreadsheet provides powerful and intuitive formula calculation capabilities, fully supporting complex nested functions like VLOOKUP, XLOOKUP, IF, and IFERROR. You can easily manage large datasets and clean up spreadsheet errors without paying expensive subscription fees.
- 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your lookup data.
- 2. Select the target cell: Click on the cell where you want the cleaned lookup result to appear.
- 3. Input the nested formula: Type =IFERROR(IF(VLOOKUP(...)="","",VLOOKUP(...)),"") into the formula bar, replacing the dots with your specific lookup criteria.
- 4. Apply across rows: Press Enter, then click and drag the fill handle at the bottom-right corner of the cell to apply the formula down the entire column.

Frequently Asked Questions
Why does VLOOKUP return a 0 when the source cell is blank?
In most spreadsheet applications, an empty cell evaluates to 0 when it is directly referenced by a formula. Because VLOOKUP successfully finds the matching row but sees no data in the return column, it defaults to outputting 0 instead of leaving it blank.
Is there a simpler alternative to nested IF VLOOKUPs?
Yes. If you are using modern spreadsheet software, you can use the XLOOKUP function. XLOOKUP has built-in error handling for missing values (the 'if_not_found' argument), though you still need an IF statement or formatting trick to prevent empty source cells from displaying as 0.
Can I hide zero values in the whole worksheet instead of changing the formula?
Yes. You can go to File > Options > Advanced, and under 'Display options for this worksheet', uncheck 'Show a zero in cells that have zero value'. However, be careful with this approach, as it hides all zeros globally, even those resulting from valid mathematical calculations.




