How to Make VLOOKUP Return Zero Instead of a Negative Value
Question details
The user needs an Excel formula to prevent the VLOOKUP function from returning a negative number, ensuring the minimum displayed value is zero.

- Product
- WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- Retrieving data using VLOOKUP where negative values exist in the source dataset, but the desired output should cap minimums at zero.
- Observed behavior
- By default, VLOOKUP pulls the exact value from the data array, displaying negative results like -500 instead of the preferred minimum of 0.
Ensure that the source data column you are retrieving values from contains properly formatted numbers, as text strings cannot be evaluated mathematically against zero.
Use the MAX Function to Cap Negative Values at Zero
Wrap your VLOOKUP formula inside a MAX function to evaluate the VLOOKUP result against 0 and return whichever is higher.
The most efficient way to prevent a negative VLOOKUP result is to use the MAX function. The MAX function evaluates multiple values and returns the largest one. By comparing your VLOOKUP result against zero, any negative number will be ignored, and zero will be returned instead.
Click on the empty cell in your spreadsheet where you want the final VLOOKUP result to be displayed.
Type the formula =MAX(VLOOKUP(G1,$A$1:$B$2,2,0),0). Replace 'G1' with your lookup value and '$A$1:$B$2' with your actual table array.
Press the Enter key. The MAX function will automatically compare the retrieved value with 0 and display the larger number.

Use the IF Function to Return Zero for Negative Results
An alternative approach is using an IF statement to check if the VLOOKUP result is less than zero.
Easily Manage Advanced Formulas with WPS Spreadsheet
WPS Office provides a powerful, free Spreadsheet tool that fully supports all standard Excel functions, including VLOOKUP, MAX, and IF. It makes handling complex data tables and nested formulas simple and efficient.
- 1. Open WPS Office: Launch WPS Spreadsheet and open your existing workbook.
- 2. Apply Formula: Select your cell and enter the nested MAX and VLOOKUP formula to cap values at zero.
- 3. Evaluate Result: Press Enter to instantly process your data without displaying negative results.
- 4. Save File: Save your work in standard .xlsx format to ensure full cross-platform compatibility.

Frequently Asked Questions
What if VLOOKUP returns an #N/A error instead of a negative number?
An #N/A error occurs when the lookup value is not found in your source data. To handle this, wrap your entire formula in the IFERROR function, like this: =IFERROR(MAX(VLOOKUP(G1,$A$1:$B$2,2,0),0), "Not Found").
Can I return a blank cell instead of a zero for negative values?
Yes, but you will need to use an IF function rather than MAX. Use the formula =IF(VLOOKUP(G1,$A$1:$B$2,2,0)<0, "", VLOOKUP(G1,$A$1:$B$2,2,0)) to display an empty string when the result is negative.
Does this formula work if my source data contains text?
The MAX function is designed to evaluate numbers. If your VLOOKUP retrieves text instead of a numerical value, the MAX function will ignore the text and return 0. Ensure your target data column contains formatted numbers.




