How to Fix Excel #VALUE! Errors Caused by Blank XLOOKUP Results
Question details
Users are encountering #VALUE! errors when dependent formulas perform mathematical operations on XLOOKUP results that return empty text strings.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Using XLOOKUP formulas where unmatched results return an empty text string (""), which then breaks dependent mathematical formulas.
- Observed behavior
- Mathematical operations referencing the XLOOKUP results fail, displaying a #VALUE! error because empty strings are treated as text and cannot be calculated.
Before modifying your formulas, identify which specific cells are returning the #VALUE! error and trace them back to the XLOOKUP formulas generating the empty strings.
Return a Numeric Value (Zero) for Missing Matches
Modify the XLOOKUP formula to return 0 instead of an empty text string when a match is not found.
Returning an empty text string ("") makes a cell look blank, but Excel treats it as text. Modifying the formula to return a numeric value prevents downstream errors.
Select the cell containing the XLOOKUP function that currently outputs an empty string when no match is found.
Change the formula to output a 0. For example: `=XLOOKUP(lookup_value, lookup_array, return_array, 0)`.
If you are working with complex formulas where the built-in argument is not enough, wrap your XLOOKUP in an IFERROR function to force a zero result: `=IFERROR(XLOOKUP(...), 0)`.

Test for Blank Cells Before Performing Calculations
If you must keep the cells visually blank with empty strings, update your dependent mathematical formulas to check for blanks first.
Resolve Formula Errors Seamlessly with WPS Spreadsheet
WPS Office provides a highly compatible and intuitive spreadsheet tool that supports advanced functions like XLOOKUP, IF, and IFERROR, making it easy to fix and prevent #VALUE! errors.
- 1. Open your spreadsheet in WPS Office: Launch WPS Spreadsheet and open the file containing the formula errors.
- 2. Use Error Checking: Navigate to the 'Formulas' tab and click on 'Error Checking' to quickly locate cells displaying the #VALUE! issue.
- 3. Edit the XLOOKUP formula: Click into the formula bar and change the missing match output from "" to 0.
- 4. Apply and drag: Press Enter to save the changes, then use the fill handle to drag the corrected formula down the column.

Frequently Asked Questions
Why does an empty string ("") cause a #VALUE! error in Excel?
An empty string is treated as a text format by Excel. When you attempt to perform standard mathematical operations like addition, subtraction, or multiplication on a text value, Excel cannot process the calculation and returns a #VALUE! error.
Does the XLOOKUP function have a built-in way to handle missing data?
Yes, XLOOKUP includes a built-in 'if_not_found' argument. You can specify exactly what value to return (such as a 0 or specific text) if the lookup value doesn't exist, which eliminates the need to use an external IFERROR function in most scenarios.
Can I hide the zero values if I change my formula to return 0?
Yes. If you prefer to return 0 for mathematical purposes but want the cell to look completely blank, you can apply a custom number format (like `0;-0;;@`) or navigate to Excel Options > Advanced, and uncheck 'Show a zero in cells that have zero value'.




