Two series in one chart

Orongo

Board Regular
Joined
Nov 6, 2011
Messages
83
Hi

I am using arrays in my VBA program to create a chart. I have created desired chart with Record macro but have problem implementing it in VBA. This snippet of code will be a part of a much larger program, so all the values are stored as arrays. The full set of data is
Code:
[TABLE="width: 200, align: left"]
<tbody>[TR]
[TD]Group[/TD]
[TD]Salary[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]159100[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]131686[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]112142[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]181480[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]194017[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]877771[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]107968[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]70528[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]93570[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]77998[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]89758[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]107180[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]156711[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]73533[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]49800[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]76058[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]161944[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]115898[/TD]
[/TR]
</tbody>[/TABLE]
This is used to calculate the median for each group, that is
Code:
[TABLE="width: 200, align: left"]
<tbody>[TR]
[TD]Group[/TD]
[TD]Median[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]131686[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]93570[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]98469[/TD]
[/TR]
</tbody>[/TABLE]

The chart I want to create will have XValues {0,1,2,3,4}, with the full set of data as scatterplot and median as xlXYScatterSmoothNoMarkers. It have been very straight forward doing this in Excel, but doing this in VBA have really turned out to be a struggle.

Is this even possible?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,203,482
Messages
6,055,661
Members
444,806
Latest member
tofanexcel

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