About outlining a worksheet

Microsoft Office Excel 2003

Data to be outlined should be in range, where each column has a label in the first row and contains similar facts, and there are no blank rows or columns within the range.

Before outlining, you may need to sort the data so that rows to be grouped are together. In the illustration above, the range was sorted by region and then by month, so that the detail rows for March and April within the East region are together, and the rows for each month within the West region are together.

Provide summary rows, either above or below each group of detail rows. For best results summary rows should contain formulas that reference cells in each of the detail rows. In the illustration, there's a total row below the detail for each month and region. For example, the sales in rows 11 through 13 are totaled in row 14. You can also outline data where the summary rows contain descriptive text or other data.

If you're outlining columns instead of rows, make sure your range has labels in the first column, and that you have summary columns either to the left or right of your detail columns.

ShowDisplaying and hiding outlined data

An outline can have up to eight levels of detail, with each inner level providing details for the preceding outer level. In the illustration, the All Sales row, which contains the total of all the rows, is level 1. The rows containing the total for each month are level 2, and the detail rows for the sales are level 3. To display only the rows for a particular level, you can click the number for the level you want to see. In the illustration, the detail rows for the East region and for April in the West region are hidden, but you can click the plus symbols to display these rows.

ShowAutomatic versus manual outlining

Outlining automatically    If you have summarized the data with formulas that contain functions, such as SUM, Excel can automatically outline the data, as in the illustration. The summary data must be adjacent to the detail data.

If you insert automatic subtotals in a range organized in rows, Excel automatically outlines the worksheet at the same time, so that you can show or hide as much detail as you need.

Outlining manually    If the data is not organized so that Excel can outline it automatically, you can create an outline manually. For example, you'll need to manually outline data if the rows or columns of summary data contain values or descriptive text instead of formulas.

ShowCustomizing an outline with styles

You can apply automatic styles to an outline, either when you create it or afterward. For outlined rows, Excel uses styles such as RowLevel_1 and RowLevel_2 . For outlined columns, Excel uses styles such as ColLevel_1 and ColLevel_2. The styles use bold, italic, and other text formats to differentiate the summary rows in your data. By changing the way each of these styles is defined, you can apply different text and cell formats to customize the appearance of your outline. You can also use autoformats to format outlined data.