To remove 0 from an Excel chart, you must change how the underlying data is handled because charts simply plot what is in the cells. The fastest way to hide zeros without deleting data is to use a Custom Number Format (0;-0;;@) on the source cells, which makes the zeros invisible to both the spreadsheet and the chart. Alternatively, you can use an IF formula to replace zeros with #N/A, which tells Excel to skip those points entirely in a line chart.
What You'll Need
- A Microsoft Excel workbook containing a chart.
- The source data table used to generate that chart.
Step-by-Step
Depending on whether you want the zero to be "invisible" or "skipped" (leaving a gap in the line), choose one of the following methods. Note that menu labels may differ slightly depending on your version of Excel or operating system.
Method 1: Using Custom Number Formatting (Best for Bar/Column Charts)
This method hides the zero value from the cell and the chart label, but the data point technically remains.
- Select the range of cells in your data table that contains the zeros you want to hide.
- Right-click the selected cells and choose Format Cells... (or press
Ctrl + 1on Windows). - In the Number tab, select Custom from the Category list on the left.
- In the Type input box, delete the existing text and type exactly:
0;-0;;@ - Click OK. The zeros will vanish from the cells and the corresponding labels/points will disappear from the chart.
Method 2: Using #N/A for Line Charts (Best for skipping gaps)
In a line chart, a zero creates a dip to the bottom axis. Replacing zero with #N/A tells Excel to ignore the point and connect the previous point to the next one.
- Create a helper column next to your original data.
- Enter an IF formula to replace zeros. For example, if your data is in cell A2, use:
=IF(A2=0, NA(), A2) - Drag the fill handle down to apply this formula to all rows in your data set.
- Right-click your chart and choose Select Data...
- Edit the data series to point to the new helper column instead of the original data column.
- Click OK. The chart will now skip the zero points instead of dropping to the baseline.
Method 3: Filtering Out Zeros
If you want to remove the entire category/row associated with the zero, use a filter.
- Select the header row of your data table.
- Go to the Data tab and click the Filter button.
- Click the filter dropdown arrow on the column containing the zeros.
- Uncheck the box next to 0 and click OK.
- Excel automatically removes hidden rows from the chart, effectively removing the zero points.
Common Mistakes
- Deleting the zero: Manually deleting the 0 and leaving the cell blank can sometimes still result in the chart treating the value as zero, depending on your "Hidden and Empty Cells" settings.
- Applying formatting to the chart axis: Users often try to change the axis settings to hide zeros. This changes the scale of the chart but does not remove specific zero-value data points.
- Using "Hide" on rows: While hiding a row removes it from the chart, doing this manually for many zeros is inefficient compared to filtering or formulas.
Tips
- Consistent Formatting: If you use the
0;-0;;@format, remember that the value is still there for calculations; it is only hidden from view. - Line Connection Settings: If using the #N/A method and you prefer a gap in the line rather than a connected line, right-click the chart, go to Select Data... > Hidden and Empty Cells, and choose Gaps.
- Dynamic Data: Use the formula method (Method 2) if your data updates frequently, as it will automatically handle new zeros as they appear.
Troubleshooting
If the zeros are still appearing after following these steps, try the following:
- Check for "Near-Zeros": Ensure the cell is exactly 0. If the cell contains 0.001 but is formatted to show no decimals, it looks like a zero but Excel will still plot it. Use
=ROUND(A2, 2)to clean the data. - Refresh the Chart: While Excel usually updates instantly, clicking outside the chart area and back in can sometimes force a redraw of the visual elements.
- Verify Range: In Select Data, double-check that the chart is actually pulling from the cells you formatted or the helper column you created.
Frequently Asked Questions
Will hiding zeros affect my SUM or AVERAGE formulas?
No. Custom number formatting only changes the visual display. The actual value remains 0, so your mathematical formulas will still function normally.
Why does #N/A show up in my spreadsheet?
The NA() function intentionally creates an error to tell the chart to ignore the point. You can hide these #N/A errors from the spreadsheet view by using Conditional Formatting to turn the text white if the cell contains an error.
Can I remove zeros from a Pie Chart?
Yes, but filtering (Method 3) is the most effective way. Pie charts cannot "skip" a point like line charts do; they simply remove the slice entirely if the row is filtered out.
Does this work in Excel for Web?
Yes, Custom Number Formatting and Filter functions work in the web version of Excel, though the menu layout may differ slightly from the desktop application.
How do I bring the zeros back?
For formatting, go back to Format Cells and change the category back to General or Number. For filters, click the filter dropdown and re-check the 0 box.