Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88054

Add a Pareto Chart Using VBA in Excel

$
0
0

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


Viewing all articles
Browse latest Browse all 88054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>