Chart & Visualization Issues

How to Prevent Missing Measurements Plotting as Zero in Excel Charts

Rana GarciaRana Garcia Nov 10, 2026 869 views

Question details

The user needs to prevent missing measurements from causing a line chart to drop to zero when using a conversion formula, without misaligning the dates.

How to Prevent Missing Measurements Plotting as Zero in Excel Charts
Product
Microsoft Excel
Device & OS
not provided
Scenario
Plotting measurement data with a conversion formula where some source data points are missing or blank.
Observed behavior
Missing source values cause the conversion formula to return zero, plunging the line chart to the zero line. Trying to hide zero values shifts the plotted data and misaligns measurements with their dates in Excel 2019.
Before you start

Ensure your chart data range is correctly selected and identify which specific cells contain the conversion formulas generating the unwanted zero values.

Solution 1Recommended

Modify the Formula to Return #N/A for Missing Data

By returning an #N/A error instead of zero, Excel charts will naturally ignore the data point without dropping to the zero line or breaking the chronological layout.

Excel line charts treat the #N/A error as an invalid data point rather than a zero. This prevents the line from plummeting while keeping the x-axis dates perfectly aligned.

1
Locate your formula

Select the cell containing your measurement conversion formula.

2
Wrap with IF and NA functions

Modify your existing formula to check if the source cell is blank. If it is, return NA(), otherwise run the conversion. For example: =IF(I5="", NA(), CONVERT(I5,"lbm","kg")).

3
Apply to the column

Press Enter and drag the fill handle down to apply this updated formula to your entire data column.

Modify the Formula to Return #N/A for Missing Data
Date Alignment Preserved: Using #N/A ensures the chart ignores the missing value entirely while keeping the remaining data points perfectly aligned with their corresponding dates.
Make Charting Easier with WPS Office

Seamlessly Manage Chart Data with WPS Spreadsheet

WPS Spreadsheet provides robust data visualization tools and full compatibility with Excel formulas like NA(). You can easily handle missing data points, adjust empty cell settings, and create professional line charts without formatting issues.

  1. 1. Open your data: Launch WPS Spreadsheet and open your existing workbook.
  2. 2. Apply the NA() formula: Use the =IF(A2="", NA(), A2) formula logic to handle missing measurements effortlessly.
  3. 3. Customize your chart: Insert a Line Chart from the Insert tab and customize empty cell displays via the Select Data menu to ensure your chart looks perfect.
Fully compatible with Microsoft Excel formulas and .xlsx files.Advanced chart settings to easily manage hidden or empty cells.Free, lightweight, and fast performance for large datasets.Familiar user interface with no learning curve required.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel plot empty cells as zero?

Excel often interprets formula results that evaluate to an empty string ("") or unhandled blank source cells as numerical zeros. As a result, line charts plot a data point directly on the zero axis.

Can I just hide the zero values instead of using NA()?

While you can hide zero values using custom number formatting (e.g., 0;-0;;@) so they don't show up in the cells, the chart may still plot them as zeros. If you filter them out entirely, it can cause the remaining data points to misalign with your date axis.

Does the NA() formula trick work for scatter charts too?

Yes, scatter charts handle #N/A errors similarly to line charts. They will ignore the invalid data points and not plot them as zero.

How do I hide the #N/A error text in my worksheet?

You can use Conditional Formatting to hide the #N/A text. Set a rule for cells containing errors to change the font color to match the cell's background color (usually white), keeping your spreadsheet visually clean.