Function Problems

How to Make VLOOKUP Return Zero Instead of a Negative Value

Steve KSteve K Nov 3, 2026 869 views

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.

How to Make VLOOKUP Return Zero Instead of a Negative Value
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.
Before you start

Ensure that the source data column you are retrieving values from contains properly formatted numbers, as text strings cannot be evaluated mathematically against zero.

Solution 1Recommended

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.

1
Select the target cell

Click on the empty cell in your spreadsheet where you want the final VLOOKUP result to be displayed.

2
Enter the MAX and VLOOKUP formula

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.

3
Apply the calculation

Press the Enter key. The MAX function will automatically compare the retrieved value with 0 and display the larger number.

Use the MAX Function to Cap Negative Values at Zero
Pro Tip: This method is highly recommended because it keeps your formula clean and prevents you from having to type out the VLOOKUP formula twice.
Advanced Spreadsheet Features

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. 1. Open WPS Office: Launch WPS Spreadsheet and open your existing workbook.
  2. 2. Apply Formula: Select your cell and enter the nested MAX and VLOOKUP formula to cap values at zero.
  3. 3. Evaluate Result: Press Enter to instantly process your data without displaying negative results.
  4. 4. Save File: Save your work in standard .xlsx format to ensure full cross-platform compatibility.
100% compatible with Microsoft Excel (.xlsx) formatsSupports over 400 advanced functions for all your data needsFree and lightweight alternative to heavy office suitesIntuitive interface for easy formula creation and debugging
microsoft office alternative - wps office

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.