I've got a dataset that has 4 dimensions – lets say they're the following:
+------------------------------+
| Type | Amnt |Price| Quality |
+-------|------|-----|---------+
| A | 15 | 4.0 | 3 |
| B | 32 | 4.5 | 4 |
| C | 35 | 3.8 | 7 |
+------------------------------+
What I'm looking to do is draw a bubble chart of this data in Excel. I can happily draw a chart showing Price against Quality, and I can then size the bubble according to Amount. However, I can't seem to find a way of being able to label the bubbles using the Type dimension. The default labels seem to just be one of the existing three dimensions used on the graph, which isn't that useful to me.
I know I can add data labels and then manually rename each one, but is there a way of using a 4th dimension for the labels automagically?
Best Answer
Once you've setup the chart with each bubble set to being series named by the Type column (which is a big pain by itself), just run this code, and it will label all of them based on that series name:
OR use this code based on a named range "MakeMeAChart" (change as you'd like) on all the data, but not the headers. It will create the chart, with each row a series, and then label them all the first column:
Note: There are a lot of bugs and tricks to doing bubble charts in VBA.