logo
search
Chart & Visualization Issues

How to Stop Excel Charts from Plotting Blank Formula Results as Zero

Adam DavisAdam Davis Sep 30, 2026 872 views

Question details

The user needs to prevent spreadsheet charts from plotting cells containing formula-generated blank strings as zero values.

How to Stop Excel Charts from Plotting Blank Formula Results as Zero
Product
Excel / WPS Spreadsheet
Device & OS
not provided
Scenario
Creating a chart based on a data range where some cells use an IF formula to return an empty string when data is missing or invalid.
Observed behavior
The chart plots the empty string results as zeroes (creating a zero bar or dipping the line to the bottom) instead of leaving a gap, even if the 'show empty cells as gaps' setting is enabled.
Before you start

Ensure you have access to the source data range of your chart and identify which formulas are currently returning empty strings ("").

Solution 1Recommended

Replace Empty Strings with the NA() Function

Modify your IF formulas to return an #N/A error instead of an empty string, which forces the chart engine to ignore the data point entirely.

Spreadsheet software distinguishes between a truly empty cell and a cell containing a formula. Even if the formula evaluates to an empty string (""), the cell is not empty, causing the chart to interpret the text string as a zero. Using the NA() function resolves this.

1
Select the target cell

Click on the first cell in your data column that contains the formula returning an empty string (e.g., =IF(B2="", "", B2*2)).

2
Update the formula

Change the empty string "" to NA(). Your updated formula should look like: =IF(B2="", NA(), B2*2).

3
Apply to the entire range

Press Enter, then click and drag the fill handle at the bottom-right of the cell to apply this updated formula to the rest of your data column.

4
Verify chart behavior

Check your chart. It will now automatically ignore the #N/A values, drawing a connecting line or leaving a gap instead of dropping to zero.

Hiding #N/A Errors: If you do not want the #N/A errors visible in your worksheet, you can use Conditional Formatting to change the font color of error cells to match the background color.

Effortlessly Manage Charts and Data with WPS Spreadsheet

WPS Spreadsheet provides advanced charting capabilities that intelligently handle empty cells, #N/A values, and complex formulas. You can easily configure how hidden and empty cells are plotted without complex workarounds.

  1. 1. Open your data file: Launch WPS Spreadsheet and open your existing workbook containing the chart and data.
  2. 2. Insert or select the chart: Highlight your data and insert a chart via the 'Insert' tab, or click on your existing chart.
  3. 3. Open data settings: Right-click the chart and choose 'Select Data' from the dropdown menu.
  4. 4. Configure empty cells: Click 'Hidden and Empty Cells' to configure exactly how #N/A or blank values are displayed on your visual plot.
Fully compatible with Microsoft Excel (.xlsx) file formats and formulas.Intuitive chart settings to easily manage gaps, zeroes, and #N/A errors.Lightweight software that quickly processes large datasets and visualizations.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel treat my blank formula result as a zero?

Spreadsheet programs distinguish between a truly empty cell (which has no content whatsoever) and a cell containing a formula. Even if the formula evaluates to an empty string (""), the cell is not technically empty, causing the chart engine to interpret the underlying text string as a zero value.

How can I hide the #N/A errors in my worksheet if I use the NA() function?

You can use Conditional Formatting to hide #N/A errors. Select your data range, create a new rule using 'Format only cells that contain', choose 'Errors', and set the font color to match your cell background (usually white).

Can I make the chart line interpolate (connect) over missing data points?

Yes. Once you have replaced empty strings with the NA() function, right-click the chart, choose 'Select Data', click 'Hidden and Empty Cells', and select the 'Connect data points with line' option.