Sub topic 17
Working on several sheets at once: group mode and 3D references
This chapter covers two ways to act on many worksheets together: group mode, which applies edits to several sheets at the same time, and 3D references, which pull values from the same cell across a run of sheets. It assumes you can add, rename, and move worksheets, and that you can write a formula that refers to a cell on another sheet, for example ='Q1 Sales'!B4.
Why work on several sheets at once
Many workbooks hold one sheet per month, region, or department. Each sheet has the same layout: headings in row 1, labels in column A, totals at the bottom. Building that layout once per sheet is slow and invites small differences between sheets. Group mode lets you build it once and have Excel copy every edit to the other sheets. A 3D reference lets you total the results without writing one long formula that names every sheet.
Group mode
When you select more than one sheet tab, the sheets become a group. Anything you type, format, insert, or delete on the active sheet is applied to the same cells on every sheet in the group. The title bar shows [Group] after the file name while the group is active.
Selecting sheets for a group
- Click the first tab, hold Shift, and click the last tab. This selects the two tabs and every tab between them.
- Click the first tab, hold Ctrl, and click each additional tab. This selects only the tabs you click.
- Right-click any tab and choose Select All Sheets. This groups every visible sheet.
You can also use Ctrl+Shift+PageDown and Ctrl+Shift+PageUp to extend the selection to the next or previous sheet.
Leaving a group
Leave group mode as soon as you finish. Click a tab that is not in the group, or right-click a grouped tab and choose Ungroup Sheets. If every visible sheet is grouped, clicking any single tab ungroups them.
What group mode is good for
- Creating identical headings, labels, and number formats on twelve monthly sheets.
- Writing the same formula in the same cell on each sheet, such as a total in B12.
- Setting column widths, fonts, and fills once.
- Setting up printing, such as margins, orientation, and header text, for all sheets.
- Inserting or deleting a row or column in the same position on all sheets.
Worked example: build twelve identical monthly sheets
- Create a sheet named
Janand give it the headings you want. Make copies by right-clicking the tab and choosing Move or Copy, then ticking Create a copy. Name the copiesFeb,Mar, and so on. - Click the
Jantab, hold Shift, and click the last monthly tab. The title bar now shows [Group]. - Type
Itemin A1,Amountin B1, andTotalin A12. - In B12 enter
=SUM(B2:B11). - Select B2:B12 and apply a currency number format from the Home tab.
- Right-click a grouped tab and choose Ungroup Sheets.
- Click
Feband confirm that the headings, formula, and format are there.
From now on, enter the monthly figures one sheet at a time, with the group dissolved.
Filling content down through the group
Group mode has one more tool. If you type content on one sheet and want to copy it to the others in the group, use Home > Fill > Across Worksheets. It copies the selected cells from the active sheet to the same addresses on the other grouped sheets. You can choose to copy everything, only contents, or only formats. This works even if the target cells already contain data, so use it with care.
Limits of group mode
- Some commands are unavailable while sheets are grouped, such as sorting and filtering with certain options, and creating a table. Excel greys them out or shows a message.
- Grouped edits apply by cell address. If the sheets differ in layout, the same address holds different things on each sheet, and the edit may damage some of them.
- Hidden sheets are not part of a selection made with Shift-click, and are skipped by Select All Sheets.
3D references
A 3D reference points to the same cell or range on a run of consecutive worksheets. It is called 3D because it extends the usual row and column dimensions across a third dimension: the sheets.
Syntax
=SUM(Jan:Mar!B2)This adds cell B2 on every sheet from Jan through Mar, in the order the sheet tabs appear. The first and last sheet names are separated by a colon, followed by an exclamation mark and the cell or range address. A range works the same way:
=SUM(Jan:Dec!B2:B11)If a sheet name contains a space or other special character, wrap the whole sheet span in single quotes:
=SUM('Q1 Sales:Q4 Sales'!B12)Note that the quotes enclose both names and the colon, not each name separately.
Functions that accept 3D references
| Function | What it does across the sheets |
|---|---|
| SUM | Adds the values |
| AVERAGE | Averages the values |
| COUNT, COUNTA | Counts numbers, or non-empty cells |
| MAX, MIN | Finds the largest or smallest value |
| PRODUCT | Multiplies the values |
| STDEV, VAR (and related) | Calculates spread across the sheets |
Functions that need a single range, such as VLOOKUP, SUMIF, INDEX, and INTERSECT, do not accept 3D references. Likewise, 3D references cannot be used in array formulas, and they cannot be combined with the implicit intersection operator.
Creating a 3D reference by clicking
- Select the cell where the total will go, on a summary sheet, and type
=SUM(. - Click the first sheet tab in the span, such as
Jan. - Hold Shift and click the last tab in the span, such as
Dec. - Click the cell, for example B12.
- Type
)and press Enter.
Excel writes =SUM(Jan:Dec!B12) for you and handles any quoting.
What happens when sheets move
A 3D reference includes whatever sits between the two end sheets at calculation time. The order of tabs therefore matters.
- Sheets you insert between the end sheets are included automatically.
- Sheets you move out from between the end sheets are removed from the calculation.
- If you move an end sheet, the reference adjusts to the sheets now bordering the span, which may change what is counted.
- If you delete an end sheet, Excel shifts the end of the span to the neighboring sheet.
Many people use this on purpose. Place two empty sheets named Start and End around the monthly sheets, and write =SUM(Start:End!B12). Sheets dragged between the markers are counted, and nothing else is.
Common errors
- #REF! appears when the sheets or cells that a 3D reference depends on are deleted in a way that leaves no valid span.
- Unexpected totals often come from a sheet that was dragged into or out of the span. Check the tab order.
- A circular reference warning means the formula's own sheet is inside the span.
- Missing quotes around a name with spaces produce an error when you type the formula by hand.
- Mismatched layouts produce wrong numbers without any error, because Excel adds whatever is in B12 on each sheet.
Combining the two techniques
Group mode and 3D references work well together. Use group mode to make every monthly sheet identical, so that the total always sits in B12. Then use one 3D reference on a summary sheet to roll the totals up.
Related technique: a link to another sheet
You can also jump to a sheet with a formula. This hyperlink goes to cell A1 on the Summary sheet when clicked:
=HYPERLINK("#'Summary'!A1","Go to Summary")This is handy on a sheet within a workbook that has many tabs.
Checklist
- Confirm all sheets share the same layout before grouping.
- Look for [Group] in the title bar before typing.
- Ungroup as soon as the shared edit is done.
- Keep the summary sheet outside any 3D span.
- Use marker sheets if sheets will be added or removed often.
Exercise
Your workbook has sheets named Summary, Jan, Feb, Mar, and Apr, in that order. Cell B12 on each month sheet holds a monthly total. Write a formula for Summary!B2 that adds the totals for Jan through Apr. Then explain what happens to the result if you drag the Mar tab to the left of Summary.
Show answer
Enter =SUM(Jan:Apr!B12) in Summary!B2. After Mar is moved to the left of Summary, the span from Jan to Apr no longer contains Mar, because Mar is now outside the two end sheets in tab order. The result drops by Mar's B12 value. Excel does not show an error, which is why tab order matters.
Exercise
You group the sheets Jan, Feb, and Mar and type 500 into B5 while Jan is active. Then you click the Summary tab, which is not in the group. What does B5 contain on Feb and Mar, and what mistake does this show?
Show answer
B5 on Feb and Mar also contains 500, because group mode applies each edit to the same cell on every sheet in the group. The mistake is entering sheet-specific data while sheets are grouped. Clicking a tab outside the group ended group mode, but the values were already written to all three sheets.