Chart & Visualization Issues

How to Create an Excel Chart Without Gaps for Blank Cells

Huda QurayshiHuda Qurayshi Oct 26, 2026 869 views

Question details

The user wants to generate an Excel chart from a dataset with missing entries (such as an incomplete list of U.S. states) without displaying gaps for the blank cells.

How to Create an Excel Chart Without Gaps for Blank States
Product
Microsoft Excel
Device & OS
not provided
Scenario
Creating a clean, continuous chart from an incomplete dataset containing blank rows or missing values.
Observed behavior
By default, the chart displays gaps, drops to zero, or leaves empty spaces on the axis where data is missing, making the visualization look disconnected.
Before you start

Before modifying your chart, ensure your dataset doesn't contain hidden spaces or zero values masquerading as blanks, as Excel treats these differently than truly empty cells.

Solution 1Recommended

Filter the Dataset to Exclude Blanks

Apply a standard filter to your source data to temporarily hide rows with blank states, which automatically removes them from the chart.

The simplest way to remove gaps from a chart is to prevent the blank cells from feeding into the chart in the first place. By default, Excel charts do not display data from hidden rows.

1
Select your data

Highlight your entire data range, including the headers for the states and their corresponding values.

2
Apply a Filter

Navigate to the Data tab on the Excel ribbon and click the 'Filter' button to add dropdown arrows to your headers.

3
Hide blank rows

Click the dropdown arrow on your values column, uncheck the box next to '(Blanks)', and click OK.

4
Review the chart

The chart will immediately update to exclude the filtered rows, completely removing the empty gaps on the axis.

Filter the Dataset to Exclude Blanks
Dynamic Updates: If you add new data later, just re-apply the filter to ensure the chart stays up-to-date and gap-free.
Create Beautiful Charts Easily

Use WPS Spreadsheet to Create Gap-Free Charts Effortlessly

WPS Office provides an intuitive spreadsheet application that allows you to manage data, apply filters, and customize chart settings to easily handle blank cells and missing data without complex formulas.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open the file containing your incomplete states data.
  2. 2. Insert your chart: Highlight your data range and navigate to the Insert tab to add your preferred chart.
  3. 3. Remove the gaps: Right-click the chart, choose 'Select Data', and adjust the empty cell settings, or use the Data tab to filter out blank rows directly.
Easily hide or connect empty cells in charts with intuitive menu options.100% compatible with Microsoft Excel (.xlsx) formats and chart layouts.Free, lightweight, and user-friendly interface for seamless data visualization.Built-in advanced filtering to instantly tidy up messy datasets before charting.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel chart show zeros instead of gaps for empty cells?

Excel often interprets formulas that return an empty string ("") as a zero value. To fix this, change your formula to return #N/A instead (e.g., `=IF(A1="", NA(), A1)`). Excel charts natively ignore #N/A errors and will bridge the gap.

Does hiding rows in the spreadsheet affect the chart?

Yes, by default, charts do not display data located in hidden rows or columns. Simply filtering or manually hiding the row containing the blank state will instantly remove the gap from your visualization.

How do I stop a line chart from dropping to zero when data is missing?

Go to Chart Design > Select Data > Hidden and Empty Cells, and choose 'Connect data points with line'. This tells Excel to draw a line straight from the last known value to the next, bridging the empty space completely.

Can I make the chart dynamic so it automatically ignores new blanks?

Yes. Formatting your source data as an Excel Table and using a Pivot Chart is a great way to handle this. You can apply a value filter to the Pivot Chart to exclude blanks, and it will remain gap-free even as new data is added.