Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2
Default Excel stack column: how to remove empty labels?

I am asking to the experts the following problem that I am unable to
solve.
I have the following worksheet:
Classes:_______Lecturer1(hours):________Lecturer 2(hours):
macro_______________20______________________30
micro_______________40______________________50
literat._____________0______________________20

I need to show with stack bars that lecturer 1 (first stack bar) has
20+40 hours and the label of any piece of the bar should have the name
of the classes. So the piece of the bar with height 20 should contain
the text "macro", the other piece of height 40 the text "micro", etc.

With Excel the latter can be obtained by showing the values of series.
Yet the chart shown contain also the labels of the series that have no
value in that column. Example: in the first stack Column on the top
there is also the text "literat." though there is any piece of
"literat." column in it.
How do I avoid (apart to cancel it manually) that the label "literat."
(or for the matter of any other class) appear in those columns that do
not contemplate hours of that class?
Thanks
AR

  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Excel stack column: how to remove empty labels?

Hi,

The series and category data labels in a stacked column will display
even if the cell is empty or contains NA().

One way around this would be to use helper columns of data and plot this
extra data as line charts. The formula would output empty or zero values
as #N/A, which will suppress the data labels in a line series.

So assuming your example data is in the range A1:C4 put the following
formula in E2 and copy down 2 and across 1.

=IF(B2=0,NA(),SUM(B$1:B1)+(B2/2))

Now add 3 extra data series to your chart. Change each one to a line
chart. Apply data labels to the lines instead of the stacked columns.
Format the lines to have no line or marker. You will also need to remove
the extra legend entries.

Cheers
Andy

wrote:
I am asking to the experts the following problem that I am unable to
solve.
I have the following worksheet:
Classes:_______Lecturer1(hours):________Lecturer 2(hours):
macro_______________20______________________30
micro_______________40______________________50
literat._____________0______________________20

I need to show with stack bars that lecturer 1 (first stack bar) has
20+40 hours and the label of any piece of the bar should have the name
of the classes. So the piece of the bar with height 20 should contain
the text "macro", the other piece of height 40 the text "micro", etc.

With Excel the latter can be obtained by showing the values of series.
Yet the chart shown contain also the labels of the series that have no
value in that column. Example: in the first stack Column on the top
there is also the text "literat." though there is any piece of
"literat." column in it.
How do I avoid (apart to cancel it manually) that the label "literat."
(or for the matter of any other class) appear in those columns that do
not contemplate hours of that class?
Thanks
AR


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2
Default Excel stack column: how to remove empty labels?


Thank you very much Andy Pope. It is not really immediate. But by trial
and error I hope to be able to implement your precious suggestions.
Thanks again.
AR

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Worksheet Functions 2 January 5th 06 02:03 AM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
Excel solver sensitivity report has empty shadow prices column? Lela Excel Discussion (Misc queries) 0 March 29th 05 02:55 PM
How do I reference every "n" cell in a column in Excel? Alma Excel Worksheet Functions 2 March 22nd 05 06:19 PM


All times are GMT +1. The time now is 02:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"