Fix Excel Charts Plotting Values for Formulas Returning Blank Strings
Question details
Users need to prevent charts from plotting unexpected data points when source cells contain formulas that output empty strings.

- Product
- Microsoft Excel / WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- Creating or modifying a chart linked to a dataset where certain cells use formulas returning empty strings instead of actual data.
- Observed behavior
- The chart plots values (such as zeros or connected lines) for formula-driven empty strings instead of leaving gaps, because the cells are not recognized as truly blank.
Verify your chart data range and identify which specific formulas in your dataset are outputting the empty strings ("").
Modify Hidden and Empty Cells Settings
Adjust how your chart handles empty or hidden cells directly in the chart settings.
Click on the chart you want to modify to bring up the Chart Design tab in the top ribbon.
Click on 'Select Data' in the Chart Design ribbon to open the Data Source dialog box.
Click the 'Hidden and Empty Cells' button located in the bottom left corner of the dialog. Choose 'Gaps' or 'Connect data points with line', then click OK.

Use the NA() Function in Formulas
Force the chart to completely ignore the data point by modifying your formulas to output a #N/A error instead of an empty string.
Easily Manage Chart Data with WPS Spreadsheet
WPS Spreadsheet provides intuitive tools for handling complex data visualizations, including seamless management of hidden and empty cells without complicated workarounds.
- 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your chart.
- 2. Access Chart Tools: Click on the chart, then go to the 'Chart Tools' tab and select 'Select Data'.
- 3. Adjust Settings: Click 'Hidden and Empty Cells' and choose 'Gaps' to prevent plotting empty string formulas.

Frequently Asked Questions
Why does Excel treat empty strings as zeros in charts?
Excel evaluates formulas returning "" (empty strings) as text, not as truly blank cells. Consequently, charts interpret these non-blank text cells as zero values and plot them on the axis.
Does the 'Show empty cells as gaps' setting work for formula blanks?
Often, the 'Gaps' setting only works for genuinely empty cells (those with no data or formula). If a formula returns an empty string, you will likely need to use the NA() function workaround for the chart to properly skip the point.
Can I hide the #N/A error values in my data table while keeping the chart intact?
Yes. You can use Conditional Formatting with a rule like =ISNA(A1) and set the font color to match your cell's background color. The error becomes invisible in the sheet but still tells the chart to skip the point.




