Skip to main content
Contents

Practise this part

5 exercises in a working spreadsheet, checked on the formula you write rather than the number you arrive at.

A spreadsheet formula with dollar signs locking a rate cell

Cell references, and what the dollar sign locks

A reference without dollar signs is relative: copy the formula down a row and B4 becomes B5. A dollar sign freezes the part it precedes, so $B$1 stays B1 wherever the formula is copied. Mixed forms lock one half: B$1 keeps the row but lets the column move, and $B1 does the opposite.

Published by

Chris

Updated on

Part 5 of 175 exercises8 min readFree account

This is the part of Excel that most often produces a column where the first answer is right and everything underneath it is zero. The formula was correct. Copying it moved something that should have stayed still.

The rule is small and the consequences are not. A reference moves when you copy it unless you tell it not to, and the dollar sign is how you tell it. Once you can say in advance what a copied formula will become, this stops being a source of bugs and becomes the thing that lets one formula fill an entire table.

Copying rewrites the formula

When you copy a formula, Excel does not copy the text. It copies the relationship. A formula in C4 that refers to B4 is really saying the cell one to my left, and when that formula lands in C5 it says the same thing about its own position, which now means B5.

That behaviour is what makes a spreadsheet worth using. Write one calculation at the top of a column, fill it down, and every row does its own version of it. The trouble starts when part of the formula should not move.

One rate, every row

A commission rate lives in one cell and every row needs it. Written without dollar signs, the rate reference slides down with the formula: the first row reads B1 correctly, the second reads B2, the third reads B3, and those cells are empty. Empty cells multiply to zero, so the column fills with zeros under one correct answer.

Every row multiplies its own sales figure by the same locked rate in B1. The sales reference moves; the rate does not.
ABC
1Rate0.08
2
3RepSalesCommission
4Ada4800384
5Blake2100168
6Chen7600608
=B4*$B$1

B4 is relative and becomes B5, B6 as the formula fills down. $B$1 is absolute and stays pointing at the rate.

Mixed references fill a whole table

A mixed reference locks one half and lets the other move, which is what you need for a grid where the row headings and the column headings are both inputs: a multiplication table, a price matrix, a set of scenarios at several rates.

  • $B1 locks the column. Copied across, it keeps reading column B; copied down, the row moves with it.
  • B$1 locks the row. Copied down, it keeps reading row 1; copied across, the column moves with it.
  • Put one of each in the same formula and you can fill the entire table from the top-left cell without touching it again.

The way to get this right is to ask, for each reference, what you want it to do as the formula travels in each direction. The dollar goes in front of whichever part must not change.

Say it before you copy it

The habit worth building is predicting out loud. Before filling a formula down three rows, say what the third copy will read. If you cannot, the formula is not finished, and a column of wrong answers is cheaper to prevent than to find.

What goes wrong

These are the mistakes this part exists to prevent. Each one is reasonable, which is why people make it and why nothing on the sheet objects.

Leaving the rate reference relative

WhyThe first row gives the right answer, which is the row you look at, and the rest are zeros that look like no commission rather than like a broken formula.

InsteadLock it with $B$1 before filling down. Check the last row in the column as well as the first.

Putting dollar signs on everything to be safe

WhyIf locking fixes the broken formula, locking more feels safer still, and on a single row it makes no visible difference.

InsteadLock only what must not move. A fully absolute formula copied down a column repeats the same answer in every row, which is a different bug wearing the same face.

Writing $B1 when you meant B$1

WhyBoth look like a locked reference at a glance, and in a formula you only ever copy in one direction the wrong one often still works.

InsteadThe dollar locks what follows it. $B locks the column letter; $1 locks the row number. Fill in both directions once and the wrong one shows itself immediately.

Common questions

What does the dollar sign do in an Excel formula?

It stops the part of the reference that follows it from changing when the formula is copied. $B$1 is fixed in both directions, B$1 keeps its row, and $B1 keeps its column.

What is the difference between absolute and relative references?

A relative reference such as B4 shifts when the formula is copied, so filling down turns it into B5. An absolute reference such as $B$4 points at the same cell wherever the formula ends up.

What is the shortcut for an absolute reference in Excel?

F4 on Windows, Cmd+T on a Mac. Place the cursor on the reference in the formula bar and press it to cycle through B1, $B$1, B$1 and $B1.

Why does my formula return zero when I copy it down?

Almost always a reference that should have been locked. The copy is pointing one row lower than intended, at an empty cell, and anything multiplied by an empty cell is zero. Add dollar signs to the reference that should stay put.

When should I use a mixed reference?

When a formula has to fill both across and down and each direction needs a different anchor, such as a price table with quantities along the top and rates down the side.

Practise it

5 exercises in a working spreadsheet, marked on the formula you write rather than the number you arrive at.

  1. 1Copy a formula down a column4 min
  2. 2Lock a reference with dollar signs5 min
  3. 3Mixed references in a grid6 min
  4. 4Predict what a copied formula becomes4 min
  5. 5Calculate salary increase scenarios7 min

Free account for this part.

Now do it in a real grid

Four exercises on the dollar sign. Copying a formula down a column, locking a single rate so every row can use it, filling a whole table from one formula with mixed references, and predicting what a copied formula will become before you copy it.

You might also like