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
This is used to calculate the median for each group, that is
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?
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]
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?