XL98: How to Create a Chart with Multiple Groups of Stacked Bars

ID: Q186974


The information in this article applies to:
  • Microsoft Excel 98 Macintosh Edition


SUMMARY

Normally, data series in a stacked column or bar chart contain one stack per category. However, it is possible to arrange your data so that the chart appears to have more than one stack per category. This article includes and example with steps for creating a chart with multiple stacks per category.


MORE INFORMATION

When you enter the following sample data and create a chart, the chart contains ten different stacks with two columns each. The first column has the Y2 value stacked over the Y1 value; every other column has the Y3 value stacked over the Y4 value.

To create the chart, follow these steps:

  1. Start Microsoft Excel and create a new workbook.


  2. Type the following into a worksheet:
    
          A1 :  X      B1 :  Y1     C1 :  Y2     D1 :  Y3     E1 :  Y4
          A2 :  X1     B2 :  1      C2 :  2      D2 :         E2 :
          A3 :         B3 :         C3 :         D3 :  3      E3 :  4
          A4 :  X2     B4 :  1      C4 :  2      D4 :         E4 :
          A5 :         B5 :         C5 :         D5 :  3      E5 :  4
          A6 :  X3     B6 :  1      C6 :  2      D6 :         E6 :
          A7 :         B7 :         C7 :         D7 :  3      E7 :  4
          A8 :  X4     B8 :  1      C8 :  2      D8 :         E8 :
          A9 :         B9 :         C9 :         D9 :  3      E9 :  4
          A10:  X5     B10:  1      C10:  2      D10:         E10:
          A11:         B11:         C11:         D11:  3      E11:  4 


  3. Select cells A1:E11. On the Insert menu, click Chart.


  4. Click the Standard Types tab in the Chart Type dialog box, and click Stacked Column under Chart Sub-Type. Click Next.


  5. In step 2 of the Chart Wizard, click the Series tab. In the Series list, click X, and then click Remove.


  6. Type the following in the Category (X) axis labels box:
    =Sheet1!$A$2:$A$11
    Then, click Next.


  7. Click Next to move to step 4 of the Chart Wizard.


  8. Click As new sheet and click Finish.


Description of the Chart

The labels X1 through X5 appear along the horizontal axis. Y1 through Y3 appear in the legend as series names. You can extend this chart to include more groups by adding more data in two rows for each new group.

The number of rows per category label defines the number of stacks per group. To add another group of two bars, insert a row before each X label and add two more columns of data in the new row, such as Y5 and Y6.

The number of columns of data per row defines the number of columns in each stack. For example, if the values for Y3 in the sample chart are moved to the first row of each group, the chart will have two stacks per group. However, the first stack would contain three columns and the second stack would contain only one column.


REFERENCES

"Getting Results with Microsoft Excel 98 Macintosh Edition," Part 3, "Show Data in Charts"

For more information about crating a chart, click Contents And Index on the Help menu (or on the Balloon Help menu if you are using a version of the Macintosh operating system earlier than 8.0), click the Index button in Microsoft Excel Help, type the following text

charts, creating
and then click Show Topics. Select the "Create a chart" topic, and click Go To. If you are unable to find the information you need, ask the Office Assistant.

Additional query words: XL98 side by adjacent

Keywords : kbdta kbchart
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbhowto


Last Reviewed: January 13, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.