logo
search
Formula Errors

How to Prevent VLOOKUP from Displaying Zero in Excel & WPS

Phi Hung VoPhi Hung Vo Sep 25, 2026 871 views

Question details

The user needs to prevent the VLOOKUP formula from returning a 0 when the matched record has a blank field, aiming to display a completely blank cell for both missing matches and blank results.

How to Prevent VLOOKUP from Displaying Zero for Blank Cells
Product
Spreadsheet
Device & OS
not provided
Scenario
Pulling data using VLOOKUP from a source table that contains empty fields, which inadvertently populates the destination report with unwanted zero values.
Observed behavior
The VLOOKUP formula returns 0 instead of a blank cell when it encounters an empty field in the lookup array.
Before you start

Verify that your lookup source range is correct and ensure that the 'blank' cells in your source data do not contain hidden spaces or actual zero values formatted as white text.

Solution 1Recommended

Use Nested IF and ISNA Functions (Recommended)

Combine VLOOKUP with IF and ISNA functions to test for both non-existent matches (#N/A errors) and blank source fields, returning a blank text string for both scenarios.

This is the most robust method because it changes the underlying data returned by the formula, rather than just hiding the zero visually. It handles missing lookups, blank results, and zero values all at once.

1
Select the target cell

Click on the cell where you want to output the lookup result.

2
Enter the nested formula

Type the formula =IF(ISNA(VLOOKUP(C3,data,4,0)),"",IF(VLOOKUP(C3,data,4,0)=0,"",VLOOKUP(C3,data,4,0))) into the formula bar.

3
Adjust formula references

Replace 'C3' with your lookup value cell, 'data' with your specific lookup range, and '4' with the column index number you are retrieving data from.

4
Apply to the column

Press Enter to confirm the formula, then click and drag the fill handle at the bottom-right of the cell to apply it to the remaining rows.

Use Nested IF and ISNA Functions (Recommended)
How the formula works: The ISNA function checks if VLOOKUP throws an error (missing match). If true, it returns "" (blank). If false, the second IF checks if the result is 0 (empty source cell). If true, it returns "" (blank), otherwise, it returns the actual VLOOKUP result.
Solve Formula Errors Easily

Use WPS Spreadsheet to Handle Complex Formulas

WPS Spreadsheet provides robust support for advanced data functions like VLOOKUP, IF, and ISNA. It allows you to clean up messy data, handle errors elegantly, and format reports exactly how you want without missing a beat.

  1. 1. Open your dataset in WPS Spreadsheet: Launch WPS Office, open Spreadsheet, and load the workbook containing your VLOOKUP tables.
  2. 2. Use the Formula Builder: Click the 'Formulas' tab on the ribbon and select 'Insert Function'. This tool guides you step-by-step through nesting IF and VLOOKUP functions effortlessly.
  3. 3. Format Cells to Hide Zeros: Quickly hide unwanted zeros visually by selecting your cells, pressing Ctrl+1, and applying the custom format 0;-0;;@.
100% compatible with Microsoft Excel formulas, functions, and custom formattingBuilt-in Function Arguments dialog to help you build complex nested formulas without syntax errorsLightweight application that handles large datasets and complex lookups smoothlyFree to use with a familiar, highly intuitive user interface
QA img-9

Frequently Asked Questions

Why does VLOOKUP return 0 for a blank cell?

By default, spreadsheet programs interpret an empty cell in a referenced lookup range as a mathematical zero. When VLOOKUP fetches this blank cell, it outputs 0 rather than a blank space.

Can I use IFERROR instead of ISNA?

Yes, you can use =IFERROR(IF(VLOOKUP(C3,data,4,0)=0,"",VLOOKUP(C3,data,4,0)),""). IFERROR is shorter and catches all error types (like #VALUE! or #REF!), whereas ISNA strictly targets missing match (#N/A) errors.

How do I return a dash instead of a blank cell?

In your IF formula, simply replace the empty quotation marks ("") with a dash enclosed in quotes ("-"). For example: IF(VLOOKUP(C3,data,4,0)=0,"-",VLOOKUP(C3,data,4,0)).

Will appending an empty string (&") fix the zero issue?

Yes, adding &"" to the end of your formula (e.g., =VLOOKUP(C3,data,4,0)&"") forces the result into a text string. This turns a zero from a blank cell into a true blank, but it also converts all valid numeric lookup results into text, which disables further mathematical calculations on them.