Fix Excel Two-Variable Data Table Showing Zero Instead of Negative Values
Question details
The user needs to fix a What-If Analysis two-variable data table that calculates or displays results as zero when the values should be negative.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Running a What-If Analysis using a two-variable data table to project outcomes that include negative values.
- Observed behavior
- The calculated results within the data table incorrectly display as zeros instead of the actual negative numbers.
Create a stripped-down backup copy of your workbook without sensitive information in case you need to test structural changes or share the file for advanced troubleshooting.
Check and Update Custom Cell Number Formatting
The most common reason for this issue is a custom number format applied to the data table cells that intentionally or accidentally converts negative numbers into zeros.
Excel uses custom number formatting codes broken into sections (Positive;Negative;Zero;Text). If the negative section is defined as "0" or left intentionally blank in a specific way, negative numbers will visually render as zeros even if the underlying calculation is correct.
Highlight all the result cells inside your two-variable data table where the zeros are appearing.
Right-click the highlighted cells and select 'Format Cells', or press the Ctrl+1 keyboard shortcut.
Navigate to the 'Number' tab and click on 'Custom' in the category list. Look at the 'Type' field to see if a format like '0;"0";0' is applied.
Change the category back to 'General' or 'Number' (with default negative configurations), click 'OK', and check if the negative values return.

Enable Automatic Calculation for Data Tables
Data tables can be computationally heavy, so Excel allows them to be paused. If paused, they may display stale zeros instead of calculating the latest negative values.
Verify Formula Logic and Input Cells
Ensure the underlying formula driving the data table is actually capable of yielding negative results based on the provided row and column input variables.
Perform Accurate What-If Analysis with WPS Spreadsheet
WPS Office provides a highly compatible and robust environment for generating two-variable data tables. You can seamlessly run complex financial models, apply precise cell formatting, and analyze multiple variables without unexpected zero value errors.
- 1. Open Your File in WPS: Launch WPS Spreadsheet and open your existing workbook containing the data table.
- 2. Access What-If Analysis: Navigate to the 'Data' tab on the top ribbon and select 'What-If Analysis'.
- 3. Configure Data Table: Select 'Data Table...' from the dropdown and correctly assign your Row and Column input cells.
- 4. Format Cells Properly: Right-click your generated table array, select 'Format Cells', and apply standard Number formatting to ensure negative numbers display correctly.

Frequently Asked Questions
Why do all cells in my two-variable data table show the exact same result?
This usually happens when your workbook's calculation mode is set to 'Automatic Except for Data Tables'. To fix this, go to Formulas > Calculation Options and change it to 'Automatic', or press F9 on your keyboard to trigger a manual calculation.
Can conditional formatting cause negative values to look like zeros?
Yes. If a conditional formatting rule evaluates to true for values less than 0 and applies a custom number format like '0' or makes the font color match the background, your negative numbers will be visually hidden or replaced with zeros.
How can I safely share my workbook for troubleshooting online?
To safely share a workbook, save a copy of the file and delete any worksheets containing personally identifiable information (PII). Replace sensitive financial or internal data with dummy numbers, verify the data table issue still exists, and then upload the sanitized copy to a file-sharing service like Google Drive, Dropbox, or OneDrive to share the link.




