Sub topic 6
How references change when you copy, fill, or move
This chapter assumes you can enter simple formulas, select ranges, and use the fill handle at a basic level. It explains how Excel rewrites cell references when a formula is copied, filled, or moved. It also covers the errors that follow when you pick the wrong kind of reference.
The working model
A cell reference in a formula can be stored in two ways.
- A relative reference, such as
B2, means "the cell in this position relative to the formula". When the formula moves to a new place by copying or filling, the reference shifts by the same distance. - An absolute reference, such as
$E$1, always points to the same cell. The$signs lock the column and the row.
Excel also allows mixed references. $E1 locks only the column. E$1 locks only the row. Press F4 while editing a reference to cycle through E1, $E$1, E$1, and $E1.
| Reference | Column when copied | Row when copied |
|---|---|---|
| `B2` | Shifts | Shifts |
| `$B$2` | Fixed | Fixed |
| `$B2` | Fixed | Shifts |
| `B$2` | Shifts | Fixed |
Copying and filling
Copying and filling both rewrite relative references. The rule is: the formula keeps its shape, and each relative reference moves by the same number of rows and columns as the formula itself.
Suppose column B holds prices and E1 holds a tax rate. You enter this formula in C2 and fill it down to C3:
C2: =B2*$E$1
C3: =B3*$E$1B2 is relative, so it becomes B3. $E$1 is absolute, so it stays fixed. If you had typed E1 without the dollar signs, C3 would read =B3*E2. That points at an empty cell and returns 0.
Moving with cut and paste
Moving works differently. When you cut a formula and paste it elsewhere, Excel keeps the formula's references exactly as they were.
Before: D2 contains =B2+C2
Copy D2 to D3 gives: =B3+C3
Cut D2 and paste to F2 gives: =B2+C2The copy refers to new cells. The moved formula still refers to the original cells.
Moving also has an effect in the other direction. If other formulas refer to a cell you cut and paste, Excel updates those formulas so they follow the cell to its new location. A copy does not do this, because the original cell stays where it was.
The diagram shows how Excel treats each action.
Common errors
- Missing dollar signs. A fixed input, such as a rate or a lookup cell, drifts down the column as you fill. Check the results in the last filled row. If they look wrong, the lock is probably missing.
- Locking too much. If every reference is absolute, every filled cell returns the same value. Lock only the parts that must not move.
- Copying when you meant to move. The new formula refers to shifted cells, and the original remains in place. Use cut when the references must stay as they are.
- Dragging a cell's border. Dragging the border of a selection moves the cells. This behaves like cut and paste, so the formula keeps its references.
Exercise
Cell F5 contains =C5*D$1. You copy F5 to G6. What formula does G6 contain? What formula would F5 contain after you cut it and paste it into G6?
Show answer
Copying moves one column right and one row down. C5 becomes D6. D$1 has a locked row, so the row stays 1, and the column shifts to E, giving =D6E$1. After cutting and pasting, the formula's references do not change, so the formula is still =C5D$1.