Sub topic 12
Cell and range addresses
Every formula, chart, and navigation shortcut in Excel depends on addresses. This chapter assumes you can open a blank workbook and recognize the Name Box and formula bar. It covers how cells and ranges are named, the three reference styles, and the mistakes that cause most address errors.
How a cell address is built
A cell address combines the column letter and the row number. Column letters come first. The cell where column B meets row 4 is B4. After column Z, columns continue as AA, AB, and so on, up to XFD. Rows run from 1 to 1,048,576.
The Name Box, to the left of the formula bar, shows the address of the active cell. You can also type an address into it and press Enter to jump there.
Ranges
A range is a group of cells treated as one unit. You write it as the top-left cell, a colon, and the bottom-right cell.
| Address | Meaning |
|---|---|
| `B2:B10` | Nine cells in column B |
| `A1:D1` | Four cells in row 1 |
| `B2:D5` | A rectangle, three columns by four rows |
| `B:B` | The whole of column B |
| `3:3` | The whole of row 3 |
| `A1:A5,C1:C5` | Two separate ranges (a union) |
Select a range by dragging, or by clicking the first cell and Shift+clicking the last. Hold Ctrl to add a second block. While you select, the Name Box shows the size of the selection, such as 4R x 3C.
Relative and absolute references
When you copy a formula, Excel adjusts the addresses by default. This is a relative reference. A dollar sign locks part of an address.
| Style | Example | Behavior when copied |
|---|---|---|
| Relative | `B4` | Column and row both shift |
| Absolute | `$B$4` | Neither shifts |
| Mixed | `$B4` or `B$4` | Only the unlocked part shifts |
Suppose C2 holds =B2*$F$1, where F1 holds a tax rate. Copy it down to C3. The formula becomes =B3*$F$1. The row of B moved, and the rate stayed fixed. Press F4 while editing a reference to cycle through the four styles.
Naming a range
You can give a range a name instead of an address. Select B2:B10, type Sales into the Name Box, and press Enter. Then =SUM(Sales) works the same as =SUM(B2:B10). Names are absolute by default and make formulas easier to read.
Common errors
- Forgetting the lock. A rate or total that drifts as you copy a formula down needs
$. - Over-locking.
$B$4copied across a row of different columns returns the same value everywhere. - Names with spaces or cell-like text. A name cannot contain spaces, and
AB12is rejected because it looks like a cell. - Deleted cells. If a formula refers to cells you delete, it shows
#REF!.
Exercise
Cell D2 contains =B2*C$1. You copy it to E5. What formula does E5 contain?
Show answer
=C5*D$1. The copy moves one column right and three rows down. B shifts to C and 2 shifts to 5. C shifts to D, but the row in C$1 is locked, so it stays 1.
Exercise
Write the address of the range covering all of column C from row 2 to row 20, and say how you would name it Scores.
Show answer
C2:C20. Select it, type Scores in the Name Box, and press Enter.