Sub topic 1
How a Formula Points at a Cell
This chapter covers how Excel identifies cells in a formula. Every later chapter on relative, absolute, and mixed references builds on it.
Prerequisites
This chapter assumes you can do the following:
- Enter and edit a basic formula in Excel, such as
=A1+B1. - Select a cell or a range of cells.
- Copy and paste cells, or drag the fill handle (the small square at the bottom-right corner of the selected cell).
Cell addresses and A1 notation
Every cell in a worksheet has an address made of its column letter followed by its row number. This system is called A1 notation. The cell in column C and row 2 is C2.
A range is written as two addresses joined by a colon. A2:A10 means every cell from A2 down to A10. B2:D4 means the rectangle of cells whose corners are B2 and D4.
When you type =A2*B2 into a cell, the formula contains two cell addresses. Excel reads each one as a pointer to the cell holding the value it needs. The formula does not hold the values. If A2 changes, the result changes too.
C2: =A2*B2In this notation, C2: is only a label showing where the formula lives. You type just =A2*B2 into cell C2.
What an address really means
You will usually read A2 as "column A, row 2". That reading is correct when you type the formula. When you copy the formula to another cell, Excel stores more than that. By default it stores the address as a position relative to the formula's own cell.
In the formula =A2*B2 in cell C2:
A2is the cell two columns to the left, in the same row.B2is the cell one column to the left, in the same row.
When the formula moves to C3, Excel keeps those offsets and rebuilds the addresses from the new location. The formula becomes =A3*B3. The next chapter covers this behavior in detail. For now, remember that an address can mean "this exact cell" or "the cell at this offset from me". The dollar sign, introduced in a later chapter, is how you choose between the two.
Seeing the pointers
You can check what a formula points at without reading the address. Select the cell and press F2 to edit it. Excel outlines each referenced cell on the sheet in a color. The color matches the address in the formula text. You can drag a colored outline to change which cell the formula points at.
The Name Box, to the left of the formula bar, shows the address of the active cell. Use it to confirm where you are before you copy a formula.
The parts of an address
An address has two independent parts: a column part and a row part. Excel treats them separately. This matters later, because you can fix one part and let the other change.
| Address | Column part | Row part |
|---|---|---|
| `C2` | C | 2 |
| `AB15` | AB | 15 |
| `A2:A10` | A (both ends) | 2 to 10 |
Columns continue past Z as AA, AB, and so on, up to XFD. Rows run from 1 to 1,048,576.
A working example
Suppose a sheet lists unit prices and quantities.
| Row | A | B | C |
|---|---|---|---|
| 1 | Price | Quantity | Total |
| 2 | 4 | 10 | |
| 3 | 6 | 5 |
Enter this formula in C2:
C2: =A2*B2C2 shows 40. Now drag the fill handle of C2 down to C3. Click C3 and look at the formula bar:
C3: =A3*B3C3 shows 30. You typed the formula once, and Excel adjusted each address for the new row. This is the default behavior, and it is what makes filling a formula down a column useful.
Why this matters
Sometimes the shifting is exactly what you want, as in the example above. Sometimes it breaks the result. If a formula needs to point at one tax rate in E1 for every row, shifting the address down would point at E2, then E3, and the results would be wrong.
To decide what a formula should do when copied, ask one question for each address in it: should this pointer move with the formula, or stay on the same cell? The next chapters give you the tools to answer either way.
Check your understanding
Exercise
Cell D5 contains the formula =B5+C5. In the relative sense Excel stores, which cells does it point at, and what formula appears in D6 after you fill D5 down one row?
Show answer
B5 is two columns to the left of D5 in the same row, and C5 is one column to the left in the same row. After filling down, D6 contains =B6+C6, because both offsets are kept and the row number moves from 5 to 6.
Exercise
You select a cell containing a formula and press F2. What does Excel show on the sheet, and why is it useful?
Show answer
Excel outlines each referenced cell with a color that matches its address in the formula text. This lets you see at a glance which cells the formula points at, and you can drag an outline to change a reference.