LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Discontiguous Chart Source

I would like to insert a pie chart where the source data is on the active
worksheet but comes from two discontiguous ranges (eg B2:C10 and B15:C15).

I have two ranges GBData, for the first range, and NonGBData for the second
range.

The following code sets the source data as B2:C15, which is incorrect. How
can I amend it to create the chart with only the data I want?

WShtName = ActiveSheet.Name
Charts.Add
ActiveChart.ChartType = xlPie
ActiveChart.SetSourceData Source:=Sheets(WShtName).Range( _
GBData.Address, NonGBData.Address), PlotBy:=xlColumns
ActiveChart.Location Whe=xlLocationAsObject, Name:=WShtName

Many thanks for any suggestions, happy New Year!




 
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
Items in a discontiguous range [email protected] Excel Programming 2 December 1st 06 08:42 AM
Is it possible to plot discontiguous cells? Peter Bernadyne Charts and Charting in Excel 8 May 11th 06 09:45 PM
Is it possible to plot discontiguous cells? Peter Bernadyne Excel Discussion (Misc queries) 0 May 9th 06 10:32 PM
discontiguous ranges in charts Pilgrim Excel Programming 1 July 3rd 04 05:53 PM
Defining a discontiguous Range object Charley Kyd[_2_] Excel Programming 15 December 30th 03 12:33 AM


All times are GMT +1. The time now is 06:51 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"