Formula not copying down correctly: why, and how to fix it
Updated · Checked on a live sheet · Excel and Google Sheets
The most likely fix
If a formula is copied down a column and the results are incorrect, the most likely issue is a relative reference that should have been absolute: a cell like G1 without $ moves to G2, G3 and so on in the copies. Lock it with $ ($G$1, or press F4 while the cursor is in the reference), then copy the formula down again.
Fix it yourself
The formula in E2 shows the problem. Edit it to the fixed version and watch the sheet recalculate.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Item | Sold | Price | Total | Tax | Tax rate | 20% |
| 2 | Sourdough loaf | 14 | $6.50 | $18.20 | |||
| 3 | Croissant | 32 | $2.80 | $0.00 | |||
| 4 | Cinnamon bun | 21 | $3.20 | $0.00 | |||
| 5 | Baguette | 18 | $3.00 | $0.00 | |||
| 6 | Rye loaf | 9 | $7.00 | $0.00 |
Shows the problem
=B2*C2*G1Fixed
=B2*C2*$G$1Causes, most likely first
1A reference that should be locked isn't
When you copy a formula, every reference without
$moves by the same number of rows. The tax rate lives only in G1, so the copy in row 3 looks at G2, which is empty, and returns $0.00.$G$1stays put in every copy. Microsoft documents F4 (Command+T on a Mac) to cycle through the reference types while editing.Wrong
=B2*C2*G1Fixed
=B2*C2*$G$12Every row shows the same result
If the copies show the first row's answer and change only when you press F9, Excel's calculation is set to Manual. Microsoft's recalculation page: choose Automatic under File › Options › Formulas › Workbook Calculation (it's the default). Formula not calculating covers this.
3A range that should grow, or stay, doesn't
A running total needs the start locked and the end free:
SUM($C$2:C2). Lock both ends and every row shows the same total; lock neither and the range slides down and adds the wrong rows. Mixed references ($C2,C$2) lock only the column or only the row.Wrong
=SUM(C2:C2)Fixed
=SUM($C$2:C2)4The lookup table moves with the formula
A VLOOKUP, XLOOKUP or SUMIFS range without
$shrinks as it slides, so lower rows search a smaller table and return #N/A or wrong values. Lock the table and the criteria ranges before filling down.Wrong
=VLOOKUP(B2,G2:J8,2,FALSE)Fixed
=VLOOKUP(B2,$G$2:$J$8,2,FALSE)
Stop it happening again
Before you copy a formula, read each reference and ask: should this move with the row, or stay put? Settings (rates, dates, thresholds) and lookup tables stay put and get $; the row's own values move. Press F4 while the cursor is in a reference to cycle K2 → $K$2 → K$2 → $K2 instead of typing dollar signs. After filling, click a cell near the bottom and check its formula: the references should point at its own row and at the fixed cells. Keeping settings in clearly labelled cells at the top or side of the sheet makes it obvious which references need locking.
Questions
Why does dragging the formula copy the same number?
Either calculation is set to Manual (the copies keep the first result until you press F9), or the copied formula refers only to locked cells, so every row really does compute the same thing. Click a copy and read its formula to tell which.
What's the difference between $A$1, A$1 and $A1?
$A$1 never moves. A$1 keeps row 1 but lets the column change when you copy sideways. $A1 keeps column A but lets the row change when you copy down. The absolute references guide shows each one on a live grid.
In Google Sheets
Copying works the same way in Google Sheets: references without $ move, and $ locks the column, the row or both. Google lists F4 as the shortcut that toggles absolute and relative references while you edit a formula. Sheets also has a calculation mode (File › Settings › Calculation): in Manual mode it only calculates when you select Calculate, so check that if copies don't update.
Why this happens
Relative references are what make one formula work for a whole column: =B2*C2 becomes =B3*C3 on the next row, which is what you want for each row's own values. A setting that lives in one cell, like a rate, a date or a lookup table, must not move, and that's what $ is for. The absolute references guide shows all three kinds with live sheets, and the course's lesson on locking references makes you practise the F4 habit.
Sources
Official documentation the facts on this page were checked against.
- Microsoft Support: SUM function
- Google Docs Editors Help: SUM
- Microsoft Support: VLOOKUP function
- Google Docs Editors Help: VLOOKUP
- Microsoft Support: Switch between relative, absolute, and mixed references
- Microsoft Support: Change formula recalculation, iteration, or precision in Excel
- Google Docs Editors Help: Keyboard shortcuts for Google Sheets