Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default not showing blank cells in a chart

I would like to have a pie chart that selects data points from a static range
only if they are non-blank cells. searching on the internet i found the code
that i am useing now which gets me a pie chart with only the datapoints i
want, but the legend still shows all possible points even if they are blank.
i have defined two names as ranges:

statevalues =OFFSET(statechtdata!$A$2,0,0,COUNTA(statechtdata! $A:$A)-1,1)

statevaluesY =OFFSET(statevalues,0,1)

and the chart series is as follows:

=SERIES(statechtdata!$A$1,'sample portfolio.xls'!statevalues,'sample
portfolio.xls'!statevaluesY,1)

also, the pie chart originally only had one color for all the data point
which i went through and began to manually change but I am wondering if there
is a setting or an option to enusre that they come in as different colors in
the first place.
--
Thanks,

Galen
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default not showing blank cells in a chart

AFAIK, with a single series Pie chart there is no automatic way to prevent
blank points showing in the Legend.

You can programmatically delete individual LegendEntries if say the relative
point is blank. To add them back if values change, need to delete and
recreate the Legend. Post back if not sure how to go about that.

To reset the default individual segment colours, select the pie, and format
Fill with Automatic.

Regards,
Peter T


"Galen" wrote in message
...
I would like to have a pie chart that selects data points from a static
range
only if they are non-blank cells. searching on the internet i found the
code
that i am useing now which gets me a pie chart with only the datapoints i
want, but the legend still shows all possible points even if they are
blank.
i have defined two names as ranges:

statevalues =OFFSET(statechtdata!$A$2,0,0,COUNTA(statechtdata! $A:$A)-1,1)

statevaluesY =OFFSET(statevalues,0,1)

and the chart series is as follows:

=SERIES(statechtdata!$A$1,'sample portfolio.xls'!statevalues,'sample
portfolio.xls'!statevaluesY,1)

also, the pie chart originally only had one color for all the data point
which i went through and began to manually change but I am wondering if
there
is a setting or an option to enusre that they come in as different colors
in
the first place.
--
Thanks,

Galen



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default not showing blank cells in a chart

yeah that's what i ended up doing. Thanks.
--
Thanks,

Galen


"Peter T" wrote:

AFAIK, with a single series Pie chart there is no automatic way to prevent
blank points showing in the Legend.

You can programmatically delete individual LegendEntries if say the relative
point is blank. To add them back if values change, need to delete and
recreate the Legend. Post back if not sure how to go about that.

To reset the default individual segment colours, select the pie, and format
Fill with Automatic.

Regards,
Peter T


"Galen" wrote in message
...
I would like to have a pie chart that selects data points from a static
range
only if they are non-blank cells. searching on the internet i found the
code
that i am useing now which gets me a pie chart with only the datapoints i
want, but the legend still shows all possible points even if they are
blank.
i have defined two names as ranges:

statevalues =OFFSET(statechtdata!$A$2,0,0,COUNTA(statechtdata! $A:$A)-1,1)

statevaluesY =OFFSET(statevalues,0,1)

and the chart series is as follows:

=SERIES(statechtdata!$A$1,'sample portfolio.xls'!statevalues,'sample
portfolio.xls'!statevaluesY,1)

also, the pie chart originally only had one color for all the data point
which i went through and began to manually change but I am wondering if
there
is a setting or an option to enusre that they come in as different colors
in
the first place.
--
Thanks,

Galen




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
Blank Cells showing as 0 in pivot DLoewenthal Excel Worksheet Functions 2 March 17th 09 06:46 PM
Avoiding empty cells showing as zero in line chart without na() [email protected] Charts and Charting in Excel 2 January 3rd 07 12:59 PM
Showing Zero for all blank cells in a range ashish128 Excel Discussion (Misc queries) 2 June 20th 06 10:06 AM
blank cells showing up as a month 1 Carl Excel Worksheet Functions 1 March 23rd 05 10:38 AM
showing blank cells Steve K Excel Discussion (Misc queries) 1 January 19th 05 04:36 AM


All times are GMT +1. The time now is 11:05 AM.

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

About Us

"It's about Microsoft Excel"