Multiple stacked bar charts

G

Gargamil

I have a project where i have to chart the compliance of three groups over a
number of months. So for each data set there is a Compliance#1 stacked upon
NonCompliance#1, then Compliance#2 stacked upon NonCompliance#2 and finally,
you guessed it, Compliance#3 stacked upon NonCompliance#3.
When i design a chart in excel it wants to place everything on top of each
other producing one column of six not the required three columns of two for
each week in the display. Can anyone point me i the right direction for
this one??
 
G

Gargamil

Nicky,

That's got it thanks. at the risk of stretching the friendship is there
any way to have different colour combinations for each of the groups

Rod
 
N

Nicky

Hi,

The easiest way might be to change the colours by hand or with a simpl
macro, eg

Sub colour_charts()

group1col1 = 11
group1col2 = 32
group2col1 = 42
group2col2 = 4
group3col1 = 30
group3col2 = 3


For n = 1 To ActiveChart.SeriesCollection(1).Points.Count Step 3
ActiveChart.SeriesCollection(1).Points(n).Interior.ColorIndex
group1col1
On Error Resume Next
ActiveChart.SeriesCollection(1).Points(n + 1).Interior.ColorIndex
group2col1
On Error Resume Next
ActiveChart.SeriesCollection(1).Points(n + 2).Interior.ColorIndex
group3col1
Next

For n = 1 To ActiveChart.SeriesCollection(2).Points.Count Step 3
ActiveChart.SeriesCollection(2).Points(n).Interior.ColorIndex
group1col2
On Error Resume Next
ActiveChart.SeriesCollection(2).Points(n + 1).Interior.ColorIndex
group2col2
On Error Resume Next
ActiveChart.SeriesCollection(2).Points(n + 2).Interior.ColorIndex
group3col2
Next

End Sub


Or, you need a separate item in the stach for each group's return.
(see attached

Attachment filename: multiple stack.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=45539
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top