Skip to main content
Learning Center
Spreadsheets for Decisions

Build a trustworthy worksheet

Write and copy formulas

Predict what a formula returns, anchor its references so copying keeps it correct, and diagnose a column that drifted onto the wrong rows.

Lesson 2 of 18 in the recommended order · About 30 min (estimate)

On this page

Outcome

Choose relative, absolute or mixed references so a formula stays correct after being copied down, across, or both, and diagnose a copied column that produces plausible but incorrect numbers.

Why it matters

Copying a formula is the moment a spreadsheet stops being a calculator and starts being a model. It is also the moment the most expensive mistakes are made, because a formula copied wrongly usually still produces numbers, and those numbers usually still look reasonable.

A total that reads #VALUE! gets fixed the same morning. A cost column where rows 7 through 40 quietly multiplied by an empty cell reads as a column of zeros, or worse, of small plausible amounts. It gets fixed after somebody has already used it.

The whole defence is one decision made once per reference: when this formula moves, should this part of it move too?

Concept

A formula is evaluated in a fixed order, not left to right. Powers first, then multiplication and division, then addition and subtraction, then comparisons. Brackets override all of it. =2+3*4 is 14, not 20, and no amount of reading it aloud changes that.

The part that matters more is what a reference means.

A relative reference is a direction, not an address. When cell E2 holds =C2*4.25, the sheet does not remember "C2". It remembers "two columns to my left, same row". Copy that formula to E3 and it still means two columns to the left, same row, which is now C3. That is exactly what you want for a column where each row does its own arithmetic.

An absolute reference is an address. $I$2 means cell I2 and keeps meaning cell I2 wherever the formula is copied. The dollar signs are not decoration: the first anchors the column, the second anchors the row.

A mixed reference anchors one axis and lets the other move. $A2 always uses column A but takes its row from wherever the formula sits. B$1 always uses row 1 but takes its column from wherever the formula sits. This is the only way to fill a two-way block from a single formula, and it is the case most people never learn, because copying down alone never requires it.

Deciding is a two-question routine:

  1. When I copy this formula down, should this reference move to the next row? If no, put a dollar sign before the row number.
  2. When I copy it across, should this reference move to the next column? If no, put a dollar sign before the column letter.

Answer those two questions for each reference in the formula and the anchoring writes itself.

One more thing that trips people up constantly: a percentage format changes what a cell shows, not what it holds. A cell displaying 18.2% holds about 0.182 — in the exercise below it holds 0.1818181818, and the display is rounded to one decimal place while the stored value is not. If you compute a share and then multiply it by 100 as well as formatting it as a percentage, you get 1818.2%. Percentage points and percentages are two different quantities, and mixing them is the single most common way a correct calculation is reported wrongly.

Worked example

Read the code

Cedar Ridge charges a rate per learner per session. The rate lives in one cell, I2, and the cost column is built from it.

        C          E
1    Learners     Cost
2       18        =C2*$I$2
3       12        =C3*$I$2
4       21        =C4*$I$2

Read E2 aloud as the sheet reads it: "the cell two columns to my left, times cell I2". Copy it down and only the first half moves. E3 becomes =C3*$I$2, E4 becomes =C4*$I$2, and the rate stays put.

Now the version without the dollar signs:

2       18        =C2*I2
3       12        =C3*I3
4       21        =C4*I4

Row 2 is correct by accident. Row 3 multiplies twelve learners by whatever happens to be in I3, and I3 is empty, so the cost of that session is recorded as zero. Nothing is highlighted. Nothing errors. The column simply becomes wrong from the second row down.

Anchored: =C2*$I$2

E2 holds =C2*$I$2 and reads C2 and I2, so it shows 76.5. E3 holds =C3*$I$2 and reads C3 and I2, so it shows 51. E4 holds =C4*$I$2 and reads C4 and I2, so it shows 89.25.CEI1234LearnersCostRate18=C2*$I$276.54.2512=C3*$I$251empty21=C4*$I$289.25empty

Copied down, each row reads its own learners and the same rate in I2.

Not anchored: =C2*I2

E2 holds =C2*I2 and reads C2 and I2, so it shows 76.5. E3 holds =C3*I3 and reads C3 and I3, which is empty, so it shows 0. E4 holds =C4*I4 and reads C4 and I4, which is empty, so it shows 0.CEI1234LearnersCostRate18=C2*I276.54.2512=C3*I30empty21=C4*I40empty

Copied down, the rate reference moves too. I3 and I4 are empty, so rows 3 and 4 show 0 with no error.

What moves when E2 is copied down to E4. Each arrow points at a cell the formula reads: the learner count always moves with the row; the rate stays on I2 only when it is anchored. The rate is this lesson's 4.25, and in this example I3 and I4 are empty.

Predict the output

Cell B2 of a small block holds =$A2*B$1, where column A holds learner counts down the page and row 1 holds rates across it.

        A       B       C       D
1    (label)   4.00    4.25    4.50
2      10
3      15
4      20

Before you read on, write down what C3 and D4 become once B2 is copied across to D2 and down to row 4, and what value each one produces.

Show the copied formulas and their values

C3 becomes =$A3*C$1, which is 15 times 4.25, or 63.75.

D4 becomes =$A4*D$1, which is 20 times 4.50, or 90.

Follow one reference at a time. $A2 has its column anchored, so copying one column to the right leaves it in column A; its row is free, so moving one row down makes it $A3. B$1 has its row anchored, so it stays in row 1; its column is free, so moving right makes it C$1.

Two common wrong answers are worth knowing by sight.

If both axes are anchored (=$A$2*$B$1), every cell in the block reads 40. That looks like a formatting problem rather than a formula problem, which is why people stare at it for a while.

If neither is anchored (=A2*B1), each cell multiplies the one above it by the one to its left — and those cells are themselves copies of the same formula, so the errors compound instead of cancelling. B2 is 40, C2 is 170, B3 is 600, and C3 reads 102,000. By the bottom-right corner the number has ninety-five thousand million million in it. Nothing errors; the numbers simply stop meaning anything, and they do it fast enough to be obvious.

The block after B2 is copied across to D2 and down to row 4: each cell's formula and the value it shows
A B C D
1 (label)4.004.254.50
210=$A2*B$1
40
=$A2*C$1
42.5
=$A2*D$1
45
315=$A3*B$1
60
=$A3*C$1
63.75
=$A3*D$1
67.5
420=$A4*B$1
80
=$A4*C$1
85
=$A4*D$1
90
  1. $A pins the column. Every formula takes its learner count from column A, and the row still moves.
  2. $1 pins the row. Every formula takes its rate from row 1, and the column still moves.
  3. C3 is =$A3*C$1: 15 × 4.25 = 63.75.
  4. D4 is =$A4*D$1: 20 × 4.50 = 90.

Modify the code

A share-of-total column starts out like this, with the total sitting in E9:

=E2/E9

It is right in row 2 and useless below it: copied to row 3 it becomes =E3/E10, which divides by an empty cell and returns #DIV/0!. At least that failure is loud.

Anchor the denominator:

=E2/$E$9

Now every row divides by the same total. Add the column up and it should come to exactly 100 percent; if it does not, a row is missing from the total or is being counted twice.

Then resist one specific temptation. Having formatted the column as a percentage, do not also write:

=E2/$E$9*100

That cell holds 18.18 and displays 1818.2%. The format has already done the multiplication for display purposes. Choose one or the other, never both.

Debug the bug

A colleague sends a workbook. The cost column looks fine at the top and the total is far too low. They have already tried retyping row 7 by hand, which fixed row 7 and nothing else.

Diagnose it in this order.

  1. Click a wrong cell and read its formula, not its value. The value tells you there is a problem; only the formula tells you what kind.
  2. Compare two rows. If row 2 says =C2*I2 and row 7 says =C7*I7, the second half moved when it should not have. That is a relative reference doing exactly what it was told.
  3. Look at where it landed. I7 is empty. An empty cell used in multiplication behaves as zero, which is why the answer is a plausible-looking 0 rather than an error.
  4. Fix the source, then re-copy. Correct the formula in the first row of the block, anchor the reference that should not have moved, and copy it down again. Do not repair the rows one at a time: you will fix the eight you can see and leave the ones below the fold.
  5. Prove the fix. Change the rate cell and watch every row move. A column that does not respond to its own input cell is not fixed; it has been overwritten with numbers.

The general shape: when a copied formula is wrong, the mistake is in the anchoring, not in the arithmetic. Retyping a value hides the mistake instead of removing it.

Try it yourself

Two blocks, two different anchoring problems. The Costs sheet needs a column copied down; the Projection sheet needs a block copied down and across at once.

Column F is already formatted as a percentage, so store the share as a fraction and let the format display it.

Build two columns that survive being copied

On the Costs sheet, work out what each session cost and what share of the total it represents, then total both columns. On the Projection sheet, fill a two-way table with one formula. Every cell you write should be copyable to its neighbours without being edited afterwards.

  1. In E2, work out the cost of session CR-101 from its learner count and the rate in I2, then produce the same result down to E7. Use Fill down if you want to copy it.
  2. In E9, total the cost column.
  3. In F2, work out CR-101's share of the total cost, then produce the same result down to F7. Column F is already formatted as a percentage, so store the share as a fraction and let the format do the rest.
  4. In F9, total the share column. It should come to 100 percent.
  5. On the Projection sheet, write one formula in B2 that works for the whole block B2 to D4 once copied.

This is a practice grid built for this course. It is not Excel and not Google Sheets, nothing you do here changes a file on your computer, and no spreadsheet application is involved.

Costs!A1This cell is supplied; it is not editable.
Practice grid, sheet Costs. Move with the arrow keys. Press Enter to edit a cell, Escape to cancel.
Row numberABCDEFGHIJ
1Session idSiteLearnersMinutesCostShare of totalInputs
2CR-101Cedar1845Rate per learner per session4.25
3CR-102Cedar1290Learners in total99
4CR-103Ridge2190
5CR-104Ridge960
6CR-105Hill2445
7CR-106Hill15120
8
9Totals
10
11
12
13
14

Sign in with your learning-center account to record attempts on this exercise. The grid works either way, and your work stays on this device.

Functions this grid understands

Anything else gives a #NAME? error. Arguments are separated by commas here; some regional settings in Excel and Google Sheets use semicolons instead.

  • ABS
  • AND
  • AVERAGE
  • AVERAGEIF
  • AVERAGEIFS
  • CONCAT
  • COUNT
  • COUNTA
  • COUNTBLANK
  • COUNTIF
  • COUNTIFS
  • DATE
  • DATEVALUE
  • DAY
  • EOMONTH
  • EXACT
  • FIND
  • IF
  • IFERROR
  • IFNA
  • INDEX
  • ISBLANK
  • ISERROR
  • ISNA
  • ISNUMBER
  • ISTEXT
  • LEFT
  • LEN
  • LOWER
  • MATCH
  • MAX
  • MID
  • MIN
  • MOD
  • MONTH
  • NA
  • NOT
  • OR
  • PROPER
  • RIGHT
  • ROUND
  • ROUNDDOWN
  • ROUNDUP
  • SEARCH
  • SQRT
  • SUBSTITUTE
  • SUM
  • SUMIF
  • SUMIFS
  • TEXT
  • TEXTJOIN
  • TODAY
  • TRIM
  • UPPER
  • VALUE
  • VLOOKUP
  • XLOOKUP
  • YEAR
What this practice grid does not do
  • Fill down and Fill right copy the selected cell to the end of the current block; there is no drag handle in this grid.
  • A percentage format changes what a cell displays, never what it stores. The stored value stays a fraction.

Practical challenge (optional)

Take a workbook you already have, or the cost table from this lesson, and give yourself a five-minute audit.

  1. Find every formula containing a number typed directly into it — a rate, a tax fraction, a headcount. For each one, decide whether it belongs in an input cell instead. Most do.
  2. Pick the longest formula on the sheet and read each reference aloud with the two questions: does it move down, does it move across.
  3. Change one input cell to an obviously wrong value, such as doubling it. Watch which cells move. Any output that does not move, and should have, is a typed-in number wearing a formula's clothes.
  4. Change it back.

Step 3 is the one worth keeping. It takes ten seconds and finds a class of error that reading never does.

Sign in to track your progress on this exercise.

AI collaboration

An assistant is genuinely good at one thing here and unreliable at another.

Useful: paste a formula and ask what it does, reference by reference. "Explain =$A2*B$1 and say what it becomes if I copy it two columns right and one row down" gets a clear, usually correct answer, and it is the kind of answer you can check in ten seconds by doing the copy yourself.

Unreliable: describing your workbook. An assistant cannot see your sheet. Asked "why is my total wrong?", it will produce a confident list of plausible causes, and there is no way to tell from the answer whether any of them is yours.

So bring it the formula, not the symptom. And check what it says the way this lesson checks everything else: copy the formula, look at what the reference became, and see whether the number moves when the input moves.

Checkpoint

You are ready for the next lesson when you can answer these without opening a sheet.

  • Give the value of =2+3*4 and of =(2+3)*4, and say which one a reader is likelier to assume.
  • Explain what $ does to a reference, and what the difference is between $B4, B$4 and $B$4.
  • Describe the two questions to ask about a reference before copying a formula.
  • Say what a cell displaying 12% actually holds, and what goes wrong if you multiply it by 100 as well.
  • Describe the ten-second test that finds a typed-in number pretending to be a calculation.

Sign in to track your progress on this exercise.

Summary and next step

A reference is either a direction or an address, and copying is what reveals which one you chose. Anchor what should not move, leave free what should, and prove the result by changing an input and watching the outputs follow.

Next: Summarize and check. You now have columns worth totalling. The next lesson is about totals that can be checked, and about the difference between a cell that is empty, a cell that holds zero, and a cell whose value nobody ever recorded.

learning.goultergroup.com

The interactive parts of this page have not loaded. Reading and links still work; reload the page to try again.