Function Problems

How to Make VLOOKUP Return Blank When the Lookup Cell is Empty

Phi Hung VoPhi Hung Vo Nov 4, 2026 869 views

Question details

The user wants the VLOOKUP function to display a blank cell rather than an error when the reference lookup cell has no data entered.

How to Make VLOOKUP Return Blank When the Lookup Cell is Empty
Product
Excel
Device & OS
not provided
Scenario
Creating dynamic spreadsheets where users input lookup values, and empty inputs currently result in unsightly #N/A errors on the sheet.
Observed behavior
VLOOKUP returns an #N/A error when the lookup cell is blank. The goal is to return an empty string (blank cell) instead, displaying the matching result only after a value is actually entered.
Before you start

Identify the exact cell reference for your lookup value and the range of your lookup table before modifying your formula.

Solution 1Recommended

Use IF and IFERROR to Test the Lookup Cell First

This is the most robust method. It checks if the lookup cell is blank before running VLOOKUP, preventing unnecessary processing and avoiding errors.

By testing the lookup value first with the IF function, you prevent VLOOKUP from executing and returning #N/A for a blank lookup value. Wrapping the VLOOKUP in IFERROR adds an extra layer of protection just in case a non-blank value still isn't found in your table.

1
Select the result cell

Click on the cell where you want the VLOOKUP result to appear.

2
Enter the combined formula

Type the formula: =IF(A2="","",IFERROR(VLOOKUP(A2,$F$2:$G$100,2,FALSE),"")). Ensure you replace 'A2' with your actual lookup cell and '$F$2:$G$100' with your actual lookup data range.

3
Apply and drag

Press Enter to apply the formula. You can then click and drag the fill handle at the bottom-right corner of the cell to copy the formula down to other rows.

Use IF and IFERROR to Test the Lookup Cell First
Tip: Using absolute references (like $F$2:$G$100) for your table array ensures the lookup range doesn't shift when you drag the formula down.
WPS Spreadsheet

Master VLOOKUP and Complex Formulas Free in WPS Office

WPS Spreadsheet fully supports advanced Excel functions like VLOOKUP, IF, and IFERROR. You can seamlessly manage, analyze, and troubleshoot your data without worrying about formula syntax differences or compatibility issues.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your data.
  2. 2. Insert the function: Click on your target cell, navigate to the Formula tab, and input your combined IF, IFERROR, and VLOOKUP formula.
  3. 3. Execute and copy: Press Enter to get the blank result, then use the fill handle to drag the formula across your desired range effortlessly.
100% compatible with Microsoft Excel formulas and .xlsx files.Built-in error checking and formula evaluation tools to fix #N/A easily.Free, lightweight, and fast alternative for complex data analysis.
microsoft office alternative - wps office

Frequently Asked Questions

Why does standard VLOOKUP return #N/A when the lookup cell is blank?

VLOOKUP searches for the exact value provided in the lookup cell. If the cell is empty, VLOOKUP literally searches for a blank string in your table array. If it doesn't find a matching blank entry, it returns the #N/A (Not Available) error.

Can I return a specific text message instead of a completely blank cell?

Yes. In the formula =IF(A2="","", ...), the second set of quotation marks represents the blank output. You can replace the empty quotation marks "" with your desired text, such as "Please enter a value" or "Not Found".

What is the difference between using IF(A2="",...) and IFERROR(...)?

The IF statement explicitly checks if the input cell is empty and stops the calculation right there, returning a blank. IFERROR runs the VLOOKUP first and catches any error, including those caused by a blank input or a misspelled lookup value that isn't in the table.