PC Review


Reply
Thread Tools Rate Thread

Bubble Chart

 
 
Austin
Guest
Posts: n/a
 
      18th Oct 2009
Hi, I am trying to create a bubble chart that (I think its required that
each series be independent) has a variable number of series. For example, as
a start I have the code below. This creates a proper bubble chart.

I want to be able to select an array (variable length) then run the macro
and it will do something similar to the actions below for each series in the
array.

I am comfortable in VBA so there isnt any need to explain the simple stuff
but this is a little beyond my reach. Can you use a for...next to run
through and add each of the series?

Thanks a lot for any help


Sub Macro1()

'
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlBubble3DEffect
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Name = "='Sheet1'!$A$2"
ActiveChart.SeriesCollection(1).XValues = "='Sheet1'!$D$2"
ActiveChart.SeriesCollection(1).Values = "='Sheet1'!$C$2"
ActiveChart.SeriesCollection(1).BubbleSizes = "='Sheet1'!$B$2"
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).Name = "='Sheet1'!$A$3"
ActiveChart.SeriesCollection(2).XValues = "='Sheet1'!$D$3"
ActiveChart.SeriesCollection(2).Values = "='Sheet1'!$C$3"
ActiveChart.SeriesCollection(2).BubbleSizes = "='Sheet1'!$B$3"
End Sub
 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      19th Oct 2009
This ancient post has a macro that does pretty much what you want:

http://groups.google.com/group/micro...e922c391279403

Why do you need one point per bubble series? For the labels? Use Rob
Bovey's Chart Labeler, a free Excel add-in from http://appspro.com, to
apply labels from a worksheet range to your data points.

- Jon
-------
Jon Peltier
Peltier Technical Services, Inc.
http://peltiertech.com/



Austin wrote:
> Hi, I am trying to create a bubble chart that (I think its required that
> each series be independent) has a variable number of series. For example, as
> a start I have the code below. This creates a proper bubble chart.
>
> I want to be able to select an array (variable length) then run the macro
> and it will do something similar to the actions below for each series in the
> array.
>
> I am comfortable in VBA so there isnt any need to explain the simple stuff
> but this is a little beyond my reach. Can you use a for...next to run
> through and add each of the series?
>
> Thanks a lot for any help
>
>
> Sub Macro1()
>
> '
> ActiveSheet.Shapes.AddChart.Select
> ActiveChart.ChartType = xlBubble3DEffect
> ActiveChart.SeriesCollection.NewSeries
> ActiveChart.SeriesCollection(1).Name = "='Sheet1'!$A$2"
> ActiveChart.SeriesCollection(1).XValues = "='Sheet1'!$D$2"
> ActiveChart.SeriesCollection(1).Values = "='Sheet1'!$C$2"
> ActiveChart.SeriesCollection(1).BubbleSizes = "='Sheet1'!$B$2"
> ActiveChart.SeriesCollection.NewSeries
> ActiveChart.SeriesCollection(2).Name = "='Sheet1'!$A$3"
> ActiveChart.SeriesCollection(2).XValues = "='Sheet1'!$D$3"
> ActiveChart.SeriesCollection(2).Values = "='Sheet1'!$C$3"
> ActiveChart.SeriesCollection(2).BubbleSizes = "='Sheet1'!$B$3"
> End Sub

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 'bubble' chart where colors are used instead of bubble size =?Utf-8?B?cGF1bG1pY2hhZWw=?= Microsoft Excel Charting 2 19th Nov 2007 11:57 PM
Re: How can I change the color of negative bubble in bubble chart Jon Peltier Microsoft Excel Charting 0 4th Jul 2007 03:29 PM
How can I change the color of negative bubble in bubble chart =?Utf-8?B?RGFuaWVs?= Microsoft Excel Charting 1 4th Jul 2007 03:25 PM
Change shape of Bubble in Bubble Chart? And make them Transparent =?Utf-8?B?UGFvY28=?= Microsoft Powerpoint 1 9th Sep 2006 12:38 AM
How do I move a hidden bubble to the front in a bubble chart in E. =?Utf-8?B?U2NvdHQ=?= Microsoft Excel Misc 0 20th Feb 2005 07:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:38 PM.