Sub topic 1
Cell references and A1 notation
Prerequisites
This chapter assumes you can do the following:
- Type a value or a formula into a Google Sheets cell and press Enter.
- Recognize a basic cell address such as A1 or B2.
- Use the arithmetic operators
+,-,*,/and^in a formula.
You do not need to know anything about copying formulas or the $ sign yet. Later chapters cover both. This chapter builds the vocabulary they depend on: what a reference is, how A1 notation names cells and ranges, and what Sheets does when it reads a reference.
What a cell reference is
A cell reference is the address of a cell, written inside a formula. When you type =A2*2, the A2 is a reference. It tells Sheets to look in cell A2, read whatever is there, and use that value in the calculation.
References are what make a spreadsheet live. If you type =10*2 the result is fixed at 20. If you type =A2*2 the result follows A2. Change A2 from 10 to 15 and the formula updates to 30 without you touching it.
A reference points to a location, not to a value. This distinction matters later. When you copy a formula, Sheets has to decide which location each copy should point to. The rest of this tutorial is about controlling that decision.
A1 notation
Google Sheets names cells with A1 notation. An address has two parts, written together with no space:
- One or more letters for the column.
- A number for the row.
So C7 is column C, row 7. Columns run A to Z, then continue AA, AB, and so on up to a limit of 18,278 columns (ZZZ). Rows are numbered from 1 and increase downward.
| Address | Column | Row |
|---|---|---|
| A1 | A | 1 |
| B2 | B | 2 |
| Z10 | Z | 10 |
| AA1 | AA (the 27th column) | 1 |
| C100 | C | 100 |
Letters are not case sensitive in formulas. Typing =a2*2 works, and Sheets converts it to =A2*2.
Reading the address as coordinates
It helps to think of the sheet as a grid where the column is the horizontal position and the row is the vertical position. B3 is two columns across from the left edge and three rows down from the top. This habit pays off when you later reason about what happens to a reference when a formula moves one column to the right or one row down.
Ranges
A range is a rectangular block of cells. In A1 notation you write the top-left cell, a colon, and the bottom-right cell:
A1:B3This covers A1, A2, A3, B1, B2 and B3. Ranges are how you hand a group of cells to a function.
=SUM(A1:A5)
=AVERAGE(B2:D2)
=COUNT(A1:C10)Some common range shapes:
| Range | What it selects |
|---|---|
| `A1:A10` | A single column, rows 1 to 10 |
| `A1:E1` | A single row, columns A to E |
| `A1:C3` | A 3 by 3 block |
| `A:A` | The whole of column A |
| `3:3` | The whole of row 3 |
| `A:C` | Columns A through C |
| `A2:A` | Column A from row 2 down, with no fixed end |
Whole-column references such as A:A are convenient because they keep working as you add data. The open-ended form A2:A skips a header row and still grows with the data. The trade-off is that they can include cells you did not intend, such as totals placed lower in the same column, so check what is in the column before relying on one.
The order of the corners does not matter. B3:A1 is read as A1:B3. Sheets normalizes it for you.
Where a reference can live
A reference can appear in several places, and each behaves slightly differently.
- In a formula in the same sheet. This is the case so far:
=A2*2. - In a function argument.
=SUM(A1:A5)passes a range toSUM. - Inside another reference-based formula.
=A2+B2*C2mixes three references with operators. Standard operator precedence applies, so multiplication happens before addition. - On another sheet. You prefix the address with the sheet name and an exclamation mark, such as
Settings!B1. A later chapter covers this in detail. For now, recognize that the sheet name is part of the address.
If a sheet name contains spaces or special characters, wrap it in single quotes:
='Price List'!B2How Sheets reads a reference
When Sheets evaluates =A2*2, it does three things:
- Finds the cell at the address A2.
- Reads that cell's current value. If A2 itself holds a formula, Sheets evaluates it first.
- Substitutes the value into the calculation.
That second step means references chain. If B2 holds =A2*2 and C2 holds =B2+1, then changing A2 recalculates B2, which recalculates C2. Sheets tracks these dependencies automatically.
What a reference sees in an empty or text cell
References to unusual cells behave in predictable ways:
| Referenced cell holds | Result in arithmetic such as `=A2*2` |
|---|---|
| A number | The number is used |
| Nothing (empty) | Treated as 0 |
| Text such as "hello" | `#VALUE!` error |
| Text that looks like a number, such as "5" stored as text | Often converted automatically, but not always reliable |
| An error such as `#DIV/0!` | The error is passed along |
Empty cells being treated as 0 matters more than it first appears. A formula that points at the wrong, empty cell does not fail loudly. It quietly multiplies by zero and gives you a plausible-looking wrong answer. You will see this exact failure again when we cover copied formulas that drift onto empty cells.
Seeing and editing references
Sheets gives you several ways to inspect which cells a formula uses.
- Double-click a formula cell, or press F2. The cell enters edit mode, and each reference in the formula is shown in a color. A matching colored border appears around the referenced cell or range.
- Click a cell while typing a formula. Instead of typing
A2, type=and then click A2. Sheets inserts the address for you. This avoids typos in addresses. - Drag in edit mode. While typing a function, drag across cells to insert a range such as
A1:A5. - Drag a colored border. In edit mode, you can drag the colored border to a new cell to change the reference.
Clicking to build references is also the habit that makes later chapters easier. When you build a formula by clicking, Sheets writes the reference in its default form, and that default form is what the next chapters teach you to change.
The default: references are relative
Every reference you type or click in Google Sheets is, by default, a relative reference. Relative means the address is understood in relation to the cell that holds the formula. Sheets does not remember "cell A2" in an absolute sense. It remembers something closer to "the cell in the same row, one column to the left."
You can see this when you move a formula. Suppose B2 holds =A2*2. Internally that reads as "take the cell one column to my left and double it." If you copy B2 to B3, the formula becomes =A3*2. It still means "the cell one column to my left," but now "my left" is in row 3.
This behavior is helpful most of the time. It is what lets you write one formula and fill it down a long list. It is a problem only when you need a formula to keep pointing at one specific cell. The $ sign, introduced in the chapter on absolute references, solves that.
The diagram below shows the idea: the formula stores a relationship, not a fixed address.
A worked example
Set up a small sheet with item prices in column A.
| Row | A | B |
|---|---|---|
| 1 | Price | Double |
| 2 | 10 | |
| 3 | 15 | |
| 4 | 20 |
Follow these steps:
- Click B2 and type
=A2*2, then press Enter. B2 shows 20. - Click B2 again. Notice the small square at the bottom-right corner of the cell. This is the fill handle.
- Drag the fill handle down to B4.
- Click B3 and look at the formula bar. It reads
=A3*2. - Click B4. It reads
=A4*2.
You wrote one formula and got three correct results. Each copy points at its own row's price because the reference is relative. Now check how a reference behaves when you read it as a position:
B2: =A2*2 -> one column left, same row
B3: =A3*2 -> one column left, same row
B4: =A4*2 -> one column left, same rowThe addresses differ, but the relationship is identical. Keep this picture in mind. Everything in the next chapters is a variation on it.
Common mistakes with plain references
These errors come up before you ever use a $ sign.
- Mixing up column and row order. The column letter always comes first.
2Ais not a valid address, whileA2is. - Typing the letter O instead of zero, or the letter l instead of one.
=AO2refers to a column named AO, not column A. Sheets accepts it without complaint if that column exists. - Referring to a header cell by accident. Starting a formula in row 2 but pointing at row 1 gives text, which produces
#VALUE!in arithmetic. - Using a whole-column range that includes a total.
=SUM(A:A)placed inside column A creates a circular reference, and Sheets reports#REF!or a circular dependency warning. - Forgetting the quotes around a sheet name with spaces.
=Price List!B2fails. Use='Price List'!B2.
Summary of key terms
| Term | Meaning |
|---|---|
| Cell reference | The address of a cell used inside a formula |
| A1 notation | Column letters followed by a row number, such as `C7` |
| Range | A rectangular block written as `A1:B3` |
| Relative reference | A reference understood in relation to the formula's own cell. This is the default. |
| Fill handle | The small square at the bottom-right of a selected cell, used to copy a formula by dragging |
Exercise
Cell C5 contains the formula =A5+B5. You copy C5 to D6, one column right and one row down. What formula does D6 contain, and why?
Show answer
D6 contains =B6+C6. Both references are relative, so each one keeps its position relative to the formula cell. In C5 the references point two columns left (A5) and one column left (B5) in the same row. In D6 the same offsets give B6 and C6, because D6 is one column to the right and one row down.
Exercise
Write the A1 range that selects column B from row 2 down, with no fixed end, so it keeps growing as data is added and skips the header in row 1. Then say what range D4:A1 selects.
Show answer
Use B2:B. The range D4:A1 selects the same block as A1:D4, which is columns A through D and rows 1 through 4, because Sheets normalizes the corner order.