Solved

Excel 2010 bar chart data labels

Posted on 2014-01-14
9
1,636 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
  • 4
  • 4
9 Comments
 
LVL 50

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
 
LVL 6

Expert Comment

by:Mahesh Bhutkar
ID: 39781578
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
Technology Partners: 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!

 
LVL 50

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 50

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 50

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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
VBA: Conversion $ vs € and vise versa 14 42
Merging text files strings with filename 18 39
Excel formula that extracts out name of url 6 38
Hash on Excel 13 33
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

713 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