Bubble Chart

LostinExcel80

New Member
Joined
Apr 10, 2020
Messages
11
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
I would like to make a Bubble chart with the following but is is pairing rows together, is there a way to add this quickly for 100's of entries?

.=SERIES('Sheet2 (2)'!$A$3,'Sheet2 (2)'!$B$2:$C$2,'Sheet2 (2)'!$B$3:$C$3,1,'Sheet2 (2)'!$B$4:$C$4)

There are hundreds of them so manual fixing it is out of the question. What I need it to be is:

=SERIES('Sheet2 (2)'!$A$1,'Sheet2 (2)'!$B$2,'Sheet2 (2)'!$C$26,1,'Sheet2 (2)'!$D$2)

Name of plotYXZ (bubble size)
Name1150050
Name2170020
Name3545530
ect845446


Thank you
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Won't it work like this?
1587111182477.png

1587111227395.png
 
Upvote 0
You idea looks interesting, I will give it a try
 
Upvote 0
There are too many for labels is the only problem with that. Want to be able to highlight one and see the "name of series"
 
Upvote 0
Add a second "highlighted" dataseries, and fetch X/Y/Z via index match lookup. Data validation dropdown turns it interactive.
1587132846728.png

1587133025192.png
1587133054120.png


Book1
BCDEF
1XYZ (bubble size)
2HighlightName2700120
3
4Name of plotYXZ (bubble size)
5Name1150050
6Name2170020
7Name3545530
8ect845446
9
10
11
Sheet2
Cell Formulas
RangeFormula
D2:F2D2=INDEX($C$5:$E$8,MATCH($C2,$B$5:$B$8,0),MATCH(D1,$C$4:$E$4,0))
Cells with Data Validation
CellAllowCriteria
C2List=$B$5:$B$8
 
Upvote 0
That then only plots 1 and I have 100's of series that need to be plotted
 
Upvote 0
Sorry, but I'm getting lost in translation now.

I've shown a way to plot all your data with 1 dataseries in #2.
In #4 you reply "There are too many for labels is the only problem with that. Want to be able to highlight one and see the "name of series"
This highlighting I've show in #5 using a selectable dataseries (C2 is a drop down which highlights and labels that data point only on the chart)

So you have all data points plotted and one highlighted in a dynamic way. What am I missing, not understanding?
 
Upvote 0
This is a job for VBA.

First of all, its customary to put X before Y, but I'll assume for whatever reason your data comes in that way and you're stuck with it. Second, et cetera is abbreviated etc, not ect. Sorry, pet peeve.

This VBA procedure will create a bubble chart based on a selected range with 4 columns in the order name, Y, X, and Z. Select the range and run the code.

VBA Code:
Sub InsertChartOneBubblePerRow()
  If TypeName(Selection) <> "Range" Then
    MsgBox "Select your data and try again"
    GoTo ExitSub
  End If
  
  Dim rng As Range
  Set rng = Selection
  If rng.Columns.Count <> 4 Then
    MsgBox "Select a four-column range and try again"
    GoTo ExitSub
  End If
  
  Dim cht As Chart
  Set cht = ActiveSheet.Shapes.AddChart2(269, xlBubble).Chart
  Do While cht.SeriesCollection.Count > 0
    cht.SeriesCollection(1).Delete
  Loop
  
  Dim rRow As Range
  For Each rRow In rng.Rows
    If IsNumeric(rRow.Cells(1, 2)) And IsNumeric(rRow.Cells(1, 3)) And IsNumeric(rRow.Cells(1, 4)) Then
      With cht.SeriesCollection.NewSeries
        .Name = "=" & rRow.Cells(1, 1).Address(, , , True)
        .XValues = rRow.Cells(1, 3)
        .Values = rRow.Cells(1, 2)
        .BubbleSizes = rRow.Cells(1, 4)
      End With
    End If
  Next
  
ExitSub:
End Sub
 
Upvote 0
He wants whatever bubble he mouses over to show the label.
Oh, okay... That's way out of my league. Leaving that to people like you, who actually know what they're talking about. I just learned the expression "pet peeve". Thanks for that too :).
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top