To hide zero values in an Excel bar chart, you must replace the zeros in your data source with the #N/A error using the formula =NA(). Excel's charting engine ignores #N/A values, meaning it will not plot a bar or a data label for those cells, whereas a zero is treated as a valid data point and plotted as a flat line or a zero label.

What You'll Need

  • Microsoft Excel installed on your PC or Mac.
  • An existing dataset containing numerical values and zeros that you wish to hide from your chart.
  • A bar or column chart already created from that data.

Step-by-Step

  1. Identify your data source: Locate the range of cells that feeds your bar chart. Note that you cannot simply "hide" the zero in the chart settings; you must modify the data the chart is reading.
  2. Create a helper column: To keep your original data intact, it is best to create a "Chart Data" column next to your original values.
  3. Insert the NA formula: In the first cell of your helper column, enter an IF statement. For example, if your value is in cell A2, enter: =IF(A2=0, NA(), A2).
    Note: Menu labels and formula behavior are generally consistent across Excel versions, though slight UI differences may exist between Windows and macOS.
  4. Apply the formula to all rows: Click the fill handle (the small square at the bottom-right of the cell) and drag it down to cover all the rows in your dataset. You will now see #N/A appearing wherever there was previously a zero.
  5. Update the chart source:
    • Right-click anywhere on your existing bar chart.
    • Select Select Data... from the context menu.
    • In the Chart data range box, click the arrow and highlight the new helper column instead of the original column containing the zeros.
    • Click OK.
  6. Verify the result: Look at your chart. The bars that previously represented zero will now be completely absent, and the X-axis will remain clean.

Common Mistakes

  • Using a blank string (""): Many users try =IF(A2=0, "", A2). While this makes the cell look empty in the spreadsheet, Excel treats a blank string as a zero in a bar chart, meaning the zero-value bar or label will still appear.
  • Deleting the data: Manually deleting zeros creates gaps in the data series, which can lead to inconsistent spacing on the chart axis or errors in the data range.
  • Hiding rows: Hiding the row in the spreadsheet does not automatically hide the data point in the chart unless you specifically change the hidden cell settings in the Select Data menu.

Tips

  • Clean up the Spreadsheet: If you find the #N/A errors unsightly in your table, use Conditional Formatting. Set a rule that if a cell contains an error, the font color should be white. This makes the #N/A invisible to the reader while remaining functional for the chart.
  • Data Labels: If you have data labels turned on, using the #N/A method is the only reliable way to ensure "0" labels do not clutter your chart.
  • Dynamic Ranges: If your data grows over time, consider converting your data range into an Excel Table (Ctrl+T). This ensures that your helper formulas and chart ranges update automatically when you add new rows.

Troubleshooting

If the zero values are still appearing after following these steps, try the following checks in order:

  1. Check for "Pseudo-Zeros": Ensure the cells are actually 0. Sometimes a cell looks like 0 but is actually 0.001 or another tiny fraction. Use the =ROUND(A2, 2) function to ensure values are true zeros.
  2. Verify the Data Range: Go back to Select Data... and double-check that the chart is pointing to the helper column (with the #N/A values) and not the original column.
  3. Refresh the Chart: Occasionally, Excel requires a manual trigger to refresh the visual. Try resizing the chart or changing a value in the data table to force a redraw.
  4. Check for Hidden Cell Settings: If you chose to hide the rows instead of using #N/A, right-click the chart > Select Data... > click the Hidden and Empty Cells button. Ensure "Show data in hidden rows and columns" is unchecked.

Frequently Asked Questions

Will using #N/A affect my calculations?

Yes, #N/A is an error value. If you try to SUM or AVERAGE a column containing #N/A, the result will also be #N/A. This is why using a separate helper column for the chart is recommended; keep your calculations in the original column and your chart data in the helper column.

Can I hide zeros without using a helper column?

Not if you want the bars and labels to vanish completely. You can change the "Number Format" of the axis or labels to 0;-0;;@, which hides the number 0 from view, but the chart still "plots" the zero point, which can leave awkward gaps or flat lines.

Does this work for line charts too?

Yes, but with a different result. In a bar chart, #N/A simply removes the bar. In a line chart, #N/A can either leave a gap in the line or connect the two surrounding points, depending on your settings in the "Hidden and Empty Cells" menu.

How do I get rid of the #N/A text in my table?

The most effective way is via Conditional Formatting. Select the range > Conditional Formatting > New Rule > Format only cells that contain > select Errors from the dropdown > set the Format font color to white.

Can I use this to hide negative values?

Yes. Simply change the formula to =IF(A2<=0, NA(), A2). This will hide any value that is zero or negative from the chart.