create stacked column chart with macro excel 2007, windows XP

Tatiana_k

New Member
Joined
Sep 16, 2014
Messages
23
Office Version
  1. 2010
Platform
  1. Windows
I'd like to create stacked column chart like
a>
<br>I've created similar dataset with 4 series with macro. It looks fine but width of all column is the same without regard to their numerical value. Please see the chart below.<br>
a>
<br><br>Vba code:<br>With Graph.Chart<br>.ChartType = xlColumnStacked<br>.ChartWizard Title:=titleofthechart<br>.SetSourceData Source:=Worksheets(2).Range(Cells(2, 1), Cells(EndRow, EndCol - 1)), PlotBy:=xlColumns<br>.SeriesCollection(1).XValues = Range(Cells(2, 5), Cells(EndRow, 5))<br>.SeriesCollection(1).Name = Cells(1, 2)<br>.ChartGroups(1).GapWidth = 0<br>.SeriesCollection(2).Name = Cells(1, 3)<br>.SeriesCollection(3).Name = Cells(1, 4)<br>End With<br><br>Is there any solution for this issue?<br>Thanks in advance,<br>Tatiana
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Tatiana_k

New Member
Joined
Sep 16, 2014
Messages
23
Office Version
  1. 2010
Platform
  1. Windows
Awesome, thanks a lot. I'll try it with stacked column chart.
 
Upvote 0

Forum statistics

Threads
1,191,025
Messages
5,984,197
Members
439,877
Latest member
kellylet

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
Top