I'm trying to insert a Pareto using VBA. I tried to use the recorder, but the resulting code does not give the same chart (for whatever reason it records the recommended Pareto as (366, xlRegionMap)).
I'd rather not have to hack together a Pareto manually (creating a cummulative percent column etc.) and just go from selecting two columns like I can when inserting manually.
sub pareto()
Range("R1:R75").Select
Range("R75").Activate
Range("R1:R75,E1:E75").Select
Range("E75").Activate
ActiveSheet.Shapes.AddChart2(366, xlRegionMap).Select
end sub