Hiding zero values in Excel chart or diagram, legend and labeling

J.Justus picture J.Justus · Jun 12, 2017 · Viewed 26k times · Source

As you can see in the attached image, my diagram accesses the table on the left. Though the values are changing and it appears that sometimes a value is 0. In this case the entire row of the table neither should be shown in the diagram nor in the legend or labeling.

How can I implement such a diagram? Example: Table with diagram (In the example, the gas costs should not be displayed)

Answer

Koby Douek picture Koby Douek · Jun 12, 2017
  1. Right click at one of the data labels, and select Format Data Labels from the context menu
  2. In the Format Data Labels dialog, Click Number in left pane, then select Custom from the Category list box, and type #"" into the Format Code text box, and click Add button to add it to Type list box.
  3. Click Close button to close the dialog. Then you can see all zero data labels are hidden.