Sub topic 16
Referring to Cells on Other Worksheets
This chapter assumes you can enter a basic formula, select cells and ranges, and rename worksheets. By the end, you will be able to build a formula that reads data from another sheet and fix the common errors that come with it.
The basic pattern
A reference to another sheet has three parts: the sheet name, an exclamation mark, and the cell address.
='Q1 Sales'!B4Excel needs single quotes around the sheet name when the name contains a space or other special character. A name such as Summary needs no quotes, though Excel accepts them.
The easiest way to build a reference is to point at it:
- Select the cell that will hold the formula and type
=. - Click the other sheet's tab.
- Click the cell, or drag across a range.
- Press Enter.
Excel writes the sheet name and quotes for you, which avoids typing mistakes.
Using references inside functions
A sheet reference works anywhere a normal reference works. This formula adds a range on another worksheet:
=SUM('Q1 Sales'!B2:B10)The sheet name applies to the whole range. You write it once, before the range.
Linking to a sheet with a hyperlink
You can also jump to another sheet. The HYPERLINK function takes a location that starts with #, followed by the sheet name and a cell.
=HYPERLINK("#'Summary'!A1","Go to Summary")Clicking the cell moves you to A1 on the Summary sheet. This is handy for a contents page at the front of a large workbook.
References when sheets change
Excel tracks sheets by name, so renaming a sheet updates every formula that uses it. Deleting a sheet is different. Formulas that pointed to it show #REF!, and Undo may not be available after you save.
Moving a sheet does not change a normal reference. Position matters only for 3D references, which are covered in the next chapter.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| `#NAME?` | Sheet name with a space typed without quotes, or a misspelled name | Add single quotes and check the spelling |
| `#REF!` | The referenced sheet or cells were deleted | Restore the sheet, or retype the reference |
| Value does not update | Calculation set to Manual | On the Formulas tab, set Calculation Options to Automatic |
| Wrong cell appears | Reference was typed instead of clicked | Click the cell to rebuild the reference |
Exercise
Your workbook has a sheet named Q2 Costs. Write a formula that totals cells C2 to C20 on that sheet, and explain why the quotes are needed.
Show answer
=SUM('Q2 Costs'!C2:C20). The sheet name contains a space, so Excel needs single quotes to know where the name ends and the exclamation mark begins.
Exercise
You delete a sheet that other formulas referred to. What do those formulas show, and how can you avoid the problem?
Show answer
They show #REF!. Avoid it by checking which formulas depend on a sheet before deleting it, or by hiding the sheet instead of deleting it.