Solved

Excel 2010 bar chart data labels

Posted on 2014-01-14
9
1,672 Views
Last Modified: 2014-01-16
I have a fairly simple bar chart that is linked to a table of data.  This data may be zero, a number greater than zero, or the cell may be blank because no data exists.  I want to show the data labels in the bar chart when the cell value is zero or greater, and I don't want the data label to appear if the cell is blank.

This seems straightforward, but after a lot of searching I have yet to come up with a solution as to how to make this happen.  If I could just suppress showing all zeros and blanks, it would be a piece of cake.  But I can't figure out how to show labels for zeros, while treating blanks as no label.  Using NA() won't work in blank cells because the chart will actually show that text as the label.  Any ideas?  I know there is a VBA solution here, but that seems rather inelegant, and this has to apply to quite a few charts.  Also, I'm don't want to hide rows or columns.  Thanks for your help!
0
Comment
Question by:Rich5150
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 39781481
Hi,

Could you send a sample ? Because I cannot see the problem

EDIT Do you have show Empty Cells as Zero or show Empty Cells as gaps?

Regards
0
 

Author Comment

by:Rich5150
ID: 39782382
Here is an example file that shows what I'm referring to.  The issue is this:  I have a range of cells that is linked to the chart, and that range of cells is linked to some other raw data.  If the raw data cell is blank, I want the bar associated with it to just be a gap with no label.  If the raw data cell has a value of zero, then the graph will still show a gap, but will have a label of zero.  I can't figure out how to format the data labels to make that happen, and I'd like to avoid using VBA to do this due to the number of charts I'm working with.
Chart-Example.xlsx
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 39782528
Hi,

Select the data Labels from your Serie

and Change the format in Format Data Labels / Number eg.

to include the 0

#'##0.0;-#'##0.0;0.0;

Regards
Chart-Examplev1.xlsx
0
 

Author Comment

by:Rich5150
ID: 39785666
The problem is that is the raw data cell is blank, then the cell linked to it treats that as a zero, and adds the data label of zero to the graph.  I don't want that.  If the raw data cell is blank, then I just want a gap where the bar would be, with no label.  Your suggestion does not address this problem.
0
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39785759
I have a solution not very elegant but it works

in the B Column I've inserted a formula to add a notch to zero

Blank stays as zero and doesn't show

Regards
Chart-Examplev2.xlsx
0
 

Author Comment

by:Rich5150
ID: 39785792
Can you refresh my memory as to what this expression is doing?

C3+1E-20

I'm thinking it's scientific notation but just want to verify.
0
 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 39786061
Hi,

C3+1E-20 is like saying C3+ 0,00000000000000000001   or 1*(10^-20)

Regards
0
 

Author Comment

by:Rich5150
ID: 39786072
That's what I thought.  I think that's as good a solution as any.  I've looked everywhere and I just don't think that Microsoft cares to change how charts recognize cells with zero values versus those that are blank when there are formulas involved such as in this case.  I appreciate your input!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question