Worksheets that contain many columns or rows of data can become hard to navigate even if you freeze the headings on screen the way you learned in Chapter 1. To make navigation easier, you can use Excel's outlining feature to create a collapsible worksheet, and then expand only those sections you need to see at any particular time. Figure 3–17 shows a worksheet containing an outline with some rows and columns expanded and others collapsed.
Figure 3–17. Use Excel's outline features to create a worksheet that you can collapse and expand to show only the sections you need.
Outlining works best for worksheets whose data is arranged in a structure or hierarchy. You can create up to eight levels for rows and eight levels for columns, giving you fine control over the outlines.
You can have Excel create an outline automatically for you from the structure it detects in a worksheet you've laid out with formulas. This is often the best way to start. If you find the automatic outline isn't what you need, you can create an outline manually instead, putting the levels exactly where you want them.
To have Excel create an outline automatically, you must set up the structure of the worksheet with the formulas in place. Excel uses the formulas to determine the hierarchy of the outline, so if the formulas aren't there, outlining doesn't work. You don't need to enter all the rows and columns of data—just those that contain the formulas and enough of the data rows and columns for the formulas to refer to.
The left screen in Figure 3–18 shows the beginning of a worksheet structured with formulas that will produce an outline. Here's what you can see:
Figure 3–18. By setting up a worksheet with a hierarchy of formulas (left), you can use Excel's automatic outlining feature to create an outline based on the formulas (right).
When you've got the formulas in place, choose Data
Group & Outline
Group
Auto Outline
from the Ribbon or Data
Group and Outline
Auto Outline
from the menu bar to create the outline automatically. The right screen in Figure 3–18 shows the same range of data turned into an outline with three levels. You can click one of the – signs in the outlining bar on the left to collapse a section, and click the + sign that replaces the – sign to expand a section again.
If the outline turns out the way you want it, you can enter the remaining formulas and data. In many cases, you'll be able to use the AutoFill feature (discussed in Chapter 1) to automatically insert the formulas in a row or column based on an existing formula.
If the automatic outline doesn't suit you, try changing the settings for automatic outlining, as discussed next. Alternatively, clear the outline by choosing Data
Group & Outline
Ungroup
Clear Outline
from the Ribbon or Data
Group and Outline
Clear Outline
from the menu bar. You can then create your outline manually, as discussed in the section after next.
To change the settings that Excel uses for outlining, follow these steps:
Data
Group and Outline
Settings
from the menu bar to display the Settings dialog box (see Figure 3–19).
Figure 3–19. Use the Settings dialog box to control the way Excel creates an automatic outline from your worksheet.
Often, it's not convenient to build the structure of a worksheet fully so that Excel can outline it automatically. In these cases, create the outline manually by using the Group command. You can also use the Group command (and its counterpart, Ungroup) to adjust an outline Excel has created for you.
To group rows or columns, follow these steps:
TIP: You can speed up the process of grouping or ungrouping rows or columns by selecting entire rows or entire columns rather than just cells in them. When you do this, Excel doesn't display the Group dialog box or the Ungroup dialog box, because it can tell from the selection whether it's rows or columns you want to group or ungroup.
Data
Group & Outline
Group
from the Ribbon (clicking the main part of the Group button rather than its pop-up button) or Data
Group and Outline
Group
from the menu bar to display the Group dialog box (shown on the left in Figure 3–20).
Figure 3–20. In the Group dialog box (left) or the Ungroup dialog box (right), select the Rows option button or the Columns option button, as appropriate.
Repeat this procedure to create more groups as needed. For example, in the worksheet I showed you earlier, you would first group the cities under their states, and then group the states under their divisions.
To ungroup rows or columns, follow these steps:
Data
Group & Outline
Ungroup
from the Ribbon (clicking the main part of the Ungroup button rather than its pop-up button) or Data
Group and Outline
Ungroup
from the menu bar to display the Ungroup dialog box (shown on the right in Figure 3–20).When you have created the outline, you can expand it or collapse it so it shows exactly what you need to see.
Click the Column Level button for the column level you want to see. For example, click the Column Level 2 button to display all the second-level columns.
Click the Row Level button for the row level you want to see. For example, click the Row Level 3 button to display all of the third-level rows.
Click the + button to expand a collapsed section of rows or columns or the – button to collapse an expanded section.
After you add or delete rows or columns within the outlined area of a worksheet, you need to update the outline. Follow these steps:
Data
Group & Outline
Group
Auto Outline
from the Ribbon or Data
Group and Outline
Auto Outline
from the menu bar. Excel displays the untitled dialog box shown in Figure 3–21.
Figure 3–21. Click the OK button in this dialog box to update the outline with details of the rows or columns you've added or deleted.
To remove outlining from a worksheet, choose Data
Group & Outline
Ungroup
Clear Outline
.
18.225.117.233