Solved

Excel 2010 bar chart data labels

Posted on 2014-01-14
9
1,621 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 48

Expert Comment

by:Rgonzo1971
Comment Utility
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
Comment Utility
0
 

Author Comment

by:Rich5150
Comment Utility
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
 
LVL 48

Expert Comment

by:Rgonzo1971
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:Rich5150
Comment Utility
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 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
Comment Utility
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
Comment Utility
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 48

Expert Comment

by:Rgonzo1971
Comment Utility
Hi,

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

Regards
0
 

Author Comment

by:Rich5150
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
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 will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

762 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

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now