edubun
English
1 / 20

1 / 6 · Basic

Absolute and mixed references

One dollar sign decides whether a copied formula keeps looking at the tax rate in B1 or slides down to an empty cell.

Jump to the 10 practice questions

You will learn

  • Pin a reference with $
  • Build a table from one formula with mixed references

1Explain

Why the tax column goes wrong after one fill

Start with a puzzle. The tax rate, 10%, sits in B1, and four prices sit in A4 to A7. Someone types =A4*B1 in B4, gets 2, which is right, and fills it down to B7. Now B5 shows 0, B6 shows #VALUE! and B7 shows 25. Before reading on, try to say why each of those three cells went wrong.

2Problem

What goes wrong

B1 holds 10% and B4 holds =A4*B1. You fill B4 down to B7. What goes wrong?

Hint

Read the formula in B5.

Solution

Answer: The rate reference slides off B1, so B5 shows 0 and the rows below go wrong too

B5 gets =A5*B2 and B2 is empty, so 0 with no error to warn you. B6 multiplies by the heading in B3 (#VALUE!) and B7 by the result in B4 (25).

3Explain

The rate slid to B2

Click B5 and read its formula: =A5*B2. Filling down moved every ordinary reference one row. The price reference went from A4 to A5, as it should, but the rate reference went from B1 to B2 as well, and B2 is empty. An empty cell counts as 0 in multiplication, so B5 quietly shows 0. B6 now multiplies by B3, which holds the heading Tax; Microsoft's #VALUE! page notes that operators like + and * may not be able to calculate cells that contain text, hence the error.

4Explore

Pinning with $

The fix is to tell the spreadsheet that B1 must never move. A dollar sign in front of part of an address pins that part. $B$1 pins both the column and the row, which makes it an absolute reference: it means B1 wherever the formula ends up. Write the first tax as =A4*$B$1, fill down, and you get =A5*$B$1, =A6*$B$1 and so on. Microsoft's own example is =$B$4*$C$4, which stays exactly the same when copied from D4 to D5. The sign has nothing to do with money. It is a marker.

Loading

Drag to turn. Scroll or pinch to zoom.

Fill B4 down as it is first and look at B5, B6 and B7. Then select B4, click after B1 in the formula bar, press F4 (or the $ button) and fill down again.

5Problem

One row down

=A4*$B$1 is copied one row down. What does it become?

Hint

$B$1 never moves.

Solution

Answer: =A5*$B$1

A4 is relative and moves; $B$1 is absolute and stays.

6Problem

F4 once

In the formula bar, the cursor is on A1. You press F4 once. What does A1 become?

Hint

Both parts pinned.

Solution

Answer: $A$1

The cycle is A1, $A$1, A$1, $A1.

7Problem

F4 twice

And after pressing F4 a second time?

Hint

Only the row stays pinned.

Solution

Answer: A$1

The second step fixes only the row.

8Problem

F4 on a Mac

Which key switches reference types on a Mac in Google Sheets?

Hint

The function keys need Fn.

Solution

Answer: Fn+F4

Google's Mac list: Absolute/relative references, Fn + F4.

9Explain

One rate cell for every row

Keeping the rate in its own cell pays off a second time. If the rate changes from 10% to 12%, you edit B1 and every row recalculates at once. Had the rate been typed into each formula as *0.1, you would have to hunt down every copy, and the one you miss leaves a wrong figure that looks perfectly normal. So put anything that might change (rates, limits, exchange rates) in labelled cells near the top. Point at them with absolute references.

10Explain

Pinning only the row, or only the column

You can pin just one part. In A$1 the row is pinned and the column moves; in $A1 it is the other way round. Microsoft's table copies each form two cells down and two cells right: $A$1 stays $A$1, A$1 becomes C$1, $A1 becomes $A3, and A1 becomes C3. You will seldom type the signs by hand. While editing a formula, put the cursor on a reference and press F4. Each press steps to the next form (A1, $A$1, A$1, $A1) and then back to A1. Google's shortcut list gives F4 for Sheets as well, and Fn+F4 on a Mac keyboard.

ReferenceColumnRowCopied 2 down, 2 right
A1movesmovesC3
$A$1fixedfixed$A$1
A$1movesfixedC$1
$A1fixedmoves$A3

11Explore

Four kinds of reference

Each reference copied two cells down and two cells right. A $ keeps the part that follows it.

Reference
const colNum = (s) => [...s].reduce((n, ch) => n * 26 + ch.charCodeAt(0) - 64, 0);
const colName = (n) => (n > 26 ? colName(Math.floor((n - 1) / 26)) : "") + String.fromCharCode(65 + ((n - 1) % 26));
const ref = "A$1", down = 2, right = 2;
  const [, c$, col, r$, row] = ref.match(/(\$?)([A-Z]+)(\$?)(\d+)/);
const c = c$ ? col : colName(colNum(col) + right);
const r = r$ ? row : Number(row) + down;
console.log(c$ + c + r$ + r);
Output
C$1

12Problem

A$1 copied

=A$1 is copied two cells down and two cells right. What does it become?

Hint

The column moves, the row stays.

Solution

Answer: =C$1

The column moves two letters; the row stays at 1.

13Problem

$A1 copied

=$A1 is copied two cells down and two cells right. What does it become?

Hint

The row moves, the column stays.

Solution

Answer: =$A3

The column stays at A; the row moves from 1 to 3.

14Problem

Row fixed, column free

Which reference keeps the row fixed but lets the column move?

Hint

The $ goes in front of the row number.

Solution

Answer: A$1

The $ sits in front of the part it fixes: here the row number.

15Explore

A multiplication table from one formula

Where do mixed references earn their keep? In a grid with one input along the top and another down the side, and a multiplication table is the classic case. Put 1 to 5 in B1:F1 and again in A2:A6, then write =B$1*$A2 in B2. Fill it across to F2 and down to F6. Each of the twenty-five copies still reads its top number from row 1 and its side number from column A. One formula fills the whole grid correctly.

Loading

Drag to turn. Scroll or pinch to zoom.

Write =B$1*$A2 in B2. Select B2:F2 and press Fill right, then select B2:F6 and press Fill down. Show formulas to see which parts stayed.

16Problem

B2 to C3

=B$1*$A2 in B2 is copied to C3. What does it become?

Hint

B$1 → C$1, $A2 → $A3.

Solution

Answer: =C$1*$A3

One right and one down: B$1 becomes C$1, $A2 becomes $A3.

17Problem

=E$1*$A5

In that table, what value does =E$1*$A5 give?

Hint

E1 is 4 and A5 is 4.

Solution

Answer: 16

E1 holds 4 and A5 holds 4: 4 × 4 = 16.

18Practice

Copy a reference with $

The helpers and the parsing are given: c$ and r$ are "$" or "". Finish shift(ref, down, right) so that a part with a $ stays and a part without one moves.

Expected output
A5
$B$1
C$1
$A3
Your code
const colNum = (s) => [...s].reduce((n, ch) => n * 26 + ch.charCodeAt(0) - 64, 0);
const colName = (n) => (n > 26 ? colName(Math.floor((n - 1) / 26)) : "") + String.fromCharCode(65 + ((n - 1) % 26));
function shift(ref, down, right) {
  const [, c$, col, r$, row] = ref.match(/(\$?)([A-Z]+)(\$?)(\d+)/);
  return ref;
}
console.log(shift("A4", 1, 0));
console.log(shift("$B$1", 1, 0));
console.log(shift("A$1", 2, 2));
console.log(shift("$A1", 2, 2));
Hint

The $ in front of the letters pins the column; the $ in front of the number pins the row.

A solution
const colNum = (s) => [...s].reduce((n, ch) => n * 26 + ch.charCodeAt(0) - 64, 0);
const colName = (n) => (n > 26 ? colName(Math.floor((n - 1) / 26)) : "") + String.fromCharCode(65 + ((n - 1) % 26));
function shift(ref, down, right) {
  const [, c$, col, r$, row] = ref.match(/(\$?)([A-Z]+)(\$?)(\d+)/);
  const c = c$ ? col : colName(colNum(col) + right);
  const r = r$ ? row : Number(row) + down;
  return c$ + c + r$ + r;
}
console.log(shift("A4", 1, 0));
console.log(shift("$B$1", 1, 0));
console.log(shift("A$1", 2, 2));
console.log(shift("$A1", 2, 2));

19Explain

Common mistakes

  • Filling =A4*B1 down without a $.

    The rate reference slides to B2, B3 and B4 along with the prices, giving 0, #VALUE! and a wrong 25 instead of three taxes.

  • Putting the $ on the wrong part: =A4*B$1 fills down fine, =A4*$B1 does not.

    $B1 pins only the column, so the row still moves. Decide which way the formula will be copied, then pin the part that would move that way.

  • Typing the rate into every formula as *0.1.

    It works until the rate changes. Then every copy has to be found and edited, and a missed one still looks normal.

  • Pressing F4 in Google Sheets outside a formula and waiting for a $.

    F4 switches reference types only while you are entering a formula. Elsewhere it is one of the Redo keys.

20

Summary

  • $ fixes the part after it: $A$1 both, A$1 the row, $A1 the column.
  • Use $B$1 for a single input cell that every row shares.
  • F4 cycles A1, $A$1, A$1, $A1 (Fn+F4 on a Mac in Google Sheets).
  • Mixed references let one formula fill a whole grid.

Next unitSUM, AVERAGE, COUNT, MIN and MAX
Full text · The whole lesson as one text

Why the tax column goes wrong after one fill

Start with a puzzle. The tax rate, 10%, sits in B1, and four prices sit in A4 to A7. Someone types =A4*B1 in B4, gets 2, which is right, and fills it down to B7. Now B5 shows 0, B6 shows #VALUE! and B7 shows 25. Before reading on, try to say why each of those three cells went wrong.

Click B5 and read its formula: =A5*B2. Filling down moved every ordinary reference one row. The price reference went from A4 to A5, as it should, but the rate reference went from B1 to B2 as well, and B2 is empty. An empty cell counts as 0 in multiplication, so B5 quietly shows 0. B6 now multiplies by B3, which holds the heading Tax; Microsoft's #VALUE! page notes that operators like + and * may not be able to calculate cells that contain text, hence the error. B7 multiplies by B4, the first tax result, and gets 12.5 × 2 = 25. That one looks believable, which makes it the worst of the three. One fill, three wrong answers, and only one of them is an error message.

The fix is to tell the spreadsheet that B1 must never move. A dollar sign in front of part of an address pins that part. $B$1 pins both the column and the row, which makes it an absolute reference: it means B1 wherever the formula ends up. Write the first tax as =A4*$B$1, fill down, and you get =A5*$B$1, =A6*$B$1 and so on. Microsoft's own example is =$B$4*$C$4, which stays exactly the same when copied from D4 to D5. The sign has nothing to do with money. It is a marker.

Keeping the rate in its own cell pays off a second time. If the rate changes from 10% to 12%, you edit B1 and every row recalculates at once. Had the rate been typed into each formula as *0.1, you would have to hunt down every copy, and the one you miss leaves a wrong figure that looks perfectly normal. So put anything that might change (rates, limits, exchange rates) in labelled cells near the top. Point at them with absolute references.

Fill B4 down as it is first and look at B5, B6 and B7. Then select B4, click after B1 in the formula bar, press F4 (or the $ button) and fill down again.

Pinning only the row, or only the column

You can pin just one part. In A$1 the row is pinned and the column moves; in $A1 it is the other way round. Microsoft's table copies each form two cells down and two cells right: $A$1 stays $A$1, A$1 becomes C$1, $A1 becomes $A3, and A1 becomes C3. You will seldom type the signs by hand. While editing a formula, put the cursor on a reference and press F4. Each press steps to the next form (A1, $A$1, A$1, $A1) and then back to A1. Google's shortcut list gives F4 for Sheets as well, and Fn+F4 on a Mac keyboard.

ReferenceColumnRowCopied 2 down, 2 right
A1movesmovesC3
$A$1fixedfixed$A$1
A$1movesfixedC$1
$A1fixedmoves$A3

Where do mixed references earn their keep? In a grid with one input along the top and another down the side, and a multiplication table is the classic case. Put 1 to 5 in B1:F1 and again in A2:A6, then write =B$1*$A2 in B2. Fill it across to F2 and down to F6. Each of the twenty-five copies still reads its top number from row 1 and its side number from column A. One formula fills the whole grid correctly.

In Google Sheets, F4 only switches references while you are entering a formula. Outside a formula, the shortcut list gives F4 as one of the keys for Redo.
Write =B$1*$A2 in B2. Select B2:F2 and press Fill right, then select B2:F6 and press Fill down. Show formulas to see which parts stayed.
Common mistakes
  • Filling =A4*B1 down without a $. The rate reference slides to B2, B3 and B4 along with the prices, giving 0, #VALUE! and a wrong 25 instead of three taxes.
  • Putting the $ on the wrong part: =A4*B$1 fills down fine, =A4*$B1 does not. $B1 pins only the column, so the row still moves. Decide which way the formula will be copied, then pin the part that would move that way.
  • Typing the rate into every formula as *0.1. It works until the rate changes. Then every copy has to be found and edited, and a missed one still looks normal.
  • Pressing F4 in Google Sheets outside a formula and waiting for a $. F4 switches reference types only while you are entering a formula. Elsewhere it is one of the Redo keys.
Teacher's noteLearners rarely get stuck on the dollar sign itself. They get stuck on predicting where a copied formula will point. Before introducing $, have them fill the broken formula and read B5, B6 and B7 out loud; three different wrong answers make the case better than any rule. Then give them one question to ask before every fill: which cells should every row share? Those get dollar signs. Leave mixed references until absolute ones feel routine, and use the multiplication table as the first mixed example, since its answers are easy to check by eye.
Key points
  • $ fixes the part after it: $A$1 both, A$1 the row, $A1 the column.
  • Use $B$1 for a single input cell that every row shares.
  • F4 cycles A1, $A$1, A$1, $A1 (Fn+F4 on a Mac in Google Sheets).
  • Mixed references let one formula fill a whole grid.

Practice questions from Absolute and mixed references on edubun

Embed this quiz

Free to embed. Please keep the credit line.

Sources for this course (19)
  • Microsoft Support, "Switch between relative, absolute, and mixed references" (support.microsoft.com/en-us/office/dfec08cd-ae65-4f56-839e-5f0d8d0baca9: $ before column and row, F4 to switch, copying two down and two right: $A$1 stays, A$1 to C$1, $A1 to $A3, A1 to C3)
  • Microsoft Support, "AVERAGE function" (support.microsoft.com/en-us/office/047bac88-d466-426c-a32b-8f33eb960cf6: text, logical values and empty cells in a reference ignored, zeros included; 10, 7, 9, 27, 2 gives 11, with 5 gives 10; mean 5, median 4, mode 3 for 2 3 3 5 7 10)
  • Microsoft Support, "COUNT function" (support.microsoft.com/en-us/office/a59cd7fc-b623-4d93-87a4-d23bf411294c: only numbers counted, dates count, errors and text do not)
  • Microsoft Support, "ROUND function" (support.microsoft.com/en-us/office/c018c5d8-40fb-4053-90b1-b3e7f61a213c: num_digits required; 2.15 to 2.2, -1.475 to -1.48, 626.3 to 1000, 1.98 to 0, -50.55 to -100)
  • Microsoft Support, "IF function" (support.microsoft.com/en-us/office/69aed7c9-4e8a-4755-a9bc-aa8bbff73be2: value_if_false optional, text in quotes except TRUE and FALSE, 0 and #NAME? problems)
  • Microsoft Support, "VLOOKUP function" (support.microsoft.com/en-us/office/0bbc8083-26fe-4963-8ab8-93a18ad188a1: range_lookup TRUE by default, sorted first column, #N/A, #REF!, #VALUE!, absolute table range, wildcards with FALSE)
  • Microsoft Support, "XLOOKUP function" (support.microsoft.com/en-us/office/b7fd680e-6d10-43e6-84f9-88eae8bf5929: not in Excel 2016 and Excel 2019, exact match by default)
  • Microsoft Support, "How to correct a #VALUE! error" (support.microsoft.com/en-us/office/15e1b616-fbf2-4147-9c0b-0a11a20e409e: + and * may not calculate cells with text, use SUM instead, IFERROR hides all errors)
  • Microsoft Support, "Excel specifications and limits" (15 digits, 64 nested levels, 255 arguments)
  • Google Docs Editors Help, "VLOOKUP" (support.google.com/docs/answer/3093318: is_sorted TRUE by default, FALSE recommended, search down to a larger value, " Apple" and "Apple " differ, wildcards, IFNA, absolute range)
  • Google Docs Editors Help, "XLOOKUP" (support.google.com/docs/answer/12405947)
  • Google Docs Editors Help, "ROUND" (support.google.com/docs/answer/3093440: places optional, 0 by default, rounding by magnitude)
  • Google Docs Editors Help, "IF" (support.google.com/docs/answer/3093364: order of the answers is the most common problem, IFS)
  • Google Docs Editors Help, "AVERAGE" (support.google.com/docs/answer/3093615: text ignored, any number of arguments)
  • Google Docs Editors Help, "COUNTA" (support.google.com/docs/answer/3093991: zero-length strings and spaces count)
  • Google Docs Editors Help, "Keyboard shortcuts for Google Sheets" (support.google.com/docs/answer/181110: F4 and Fn+F4 while entering a formula, F4 as Redo)
  • Pryor Learning and Exceljet (F4 cycle A1, $A$1, A$1, $A1; = comparison not case-sensitive)
  • Ablebits (IF without value_if_false returns FALSE)
  • Spreadsheet Class (Sheets circular dependency shows #REF!)

Checked: 2026-10-19