Hide data labels with zero values WITHOUT changing number format

raheem

New Member
Joined
Apr 24, 2017
Messages
34
Hi,
How to hide data labels with zero value? I did a bit search but all solutions suggested are by changing number format. As I already have a defined number format in the chart, changing format is not an option. Also, VBA is not an option.
 
Ok maybe I didn’t mention properly. Here is the case. All figures are in millions with scale. Means, 1,234,567 is shown as 1.23 in the chart. Likewise, -457,310 is shown as -0.46. This must remain same. But there should be no data label if value is zero.
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
So apply a custom number format to the data labels of:

0.00,,;-0.00,,;;
 
Upvote 0
Right click data labels and choose format.

Under number select custom category and then under format code type:

0;-0;
 
Upvote 0
Hi,
How to hide data labels with zero value? I did a bit search but all solutions suggested are by changing number format. As I already have a defined number format in the chart, changing format is not an option. Also, VBA is not an option.
So what's the number format?

A number format is like this:
{format if positive};{format if negative};{format if zero};{format if text}

So just delete whatever is in the {format if zero} position, or if there is no {format if zero}, append a semicolon.
 
Upvote 0
The requirement of report is that number format should be #'##0,
This I cannot change. Was just wondering if I can do something with chart itself not to show zero value labels. But from all answers, it looks like that this is not possible without changing the number format.
 
Upvote 0
I don't think you're getting what we are saying. If you change the number format of the labels to use:

#'##0,;-#'##0, ;;

then they will display positive (and negative) numbers in the format you want but they won't show 0 values at all.
 
Upvote 0
I don't think you're getting what we are saying. If you change the number format of the labels to use:

#'##0,;-#'##0, ;;

then they will display positive (and negative) numbers in the format you want but they won't show 0 values at all.
O yes... Got it.... . Although if the format is applied on data table, the negative numbers get a slightly increased indent in the cell as compare to positive, but that's fine. Thanks for help.
 
Upvote 0
You should be able to adjust the formatting to line everything up as you need.
 
Upvote 0
Remove the space after the second comma in Rory's number format.
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,839
Members
449,193
Latest member
MikeVol

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top