Sub topic 2
Naming cells with A1 notation
A1 notation is the addressing system Google Sheets uses to name cells and ranges. This chapter assumes you can open a spreadsheet, type values into cells, and use the basic arithmetic operators (+, -, *, /). It also assumes you know that a formula starts with =. Everything else about references builds on the addressing rules covered here.
Why addresses matter
A formula is only useful if it can read values from other cells. To do that, it needs a way to say which cell it means. Sheets uses the column letter followed by the row number. This is called A1 notation, named after the cell in the top-left corner of every sheet.
When you write a reference instead of a typed number, the formula stays connected to the data. If the cell changes, the result changes with it. That live link is the main reason to use references.
The structure of an address
An address has two parts, written together with no space between them.
- The column, shown as one or more letters: A, B, C, and so on.
- The row, shown as a number: 1, 2, 3, and so on.
So B3 is the cell in column B, row 3. D2 is the cell in column D, row 2. The column always comes first. 3B is not a valid address.
Column letters run A to Z, and then continue AA, AB, AC, up to AZ, then BA, BB, and so on. A new sheet has 26 columns by default, but you can add more. Rows are numbered continuously. Column letters are not case sensitive, so b3 and B3 mean the same cell. Sheets usually changes your text to uppercase for you when you finish typing.
Using an address in a formula
Place an address after the = sign and the formula reads the value stored in that cell. Suppose B2 holds a quantity of 4 and C2 holds a unit price of 2.50. In D2 you type:
=B2*C2D2 shows 10. If you change B2 to 6, D2 updates to 15 without any further action.
You can mix references and typed numbers in one formula. For example, =B2*C2*1.2 multiplies the two cells and then applies a fixed 20 percent increase. Typed numbers inside formulas are called constants. A constant that may change later, such as a tax rate, is better kept in its own cell and referred to by address. The chapter on absolute references returns to that idea.
Clicking instead of typing
You do not need to type every address. While you are editing a formula, click a cell and Sheets inserts its address at the cursor. This avoids typos and is useful when you are working on a large sheet. You can also use the arrow keys while editing, which moves a highlighted box and inserts the address it lands on.
Sheets colors each reference in the formula and draws a matching colored border around the referenced cell. This gives you a fast visual check that the formula points where you think it does.
Reading values from cells with different content
A reference returns whatever the cell holds, and the result depends on its content type.
| Cell content | What `=A1` returns | Notes |
|---|---|---|
| Number | The number | Works in arithmetic |
| Text | The text | Arithmetic on text usually causes `#VALUE!` |
| Date | A date value | Dates are stored as numbers underneath |
| Empty cell | Nothing visible | Treated as 0 in arithmetic, and as empty text in text joins |
| Formula | The formula's result | The reference reads the result, not the formula |
The last row matters. If A1 contains =B1+C1, then =A1*2 reads the calculated sum, not the formula text. This lets you chain calculations, with each step building on the one before.
Empty cells and numbers stored as text
Two edge cases cause many beginner bugs.
An empty cell behaves as zero in arithmetic. If B2 is blank, =B2*C2 shows 0, not an error and not a blank. You may therefore see a row of zeros when your data has not been entered yet.
A number stored as text looks like a number but is left-aligned and is not used as one. This often happens with data pasted from other systems. A cell holding the text "12" can still be reduced to a number in simple arithmetic such as =A1+1, because Sheets converts it. Functions that sum ranges, such as SUM, usually skip text cells entirely. As a result, a total can be lower than you expect without any error message appearing. If a column of numbers is aligned to the left, check whether it holds text.
Referring to a cell in the same formula where you are
A formula cannot refer to its own cell. If you type =A1+1 in A1, Sheets reports a circular dependency error, because the result would depend on itself. The same problem appears through a chain: A1 refers to B1, and B1 refers back to A1. Sheets flags both cases. Look for the cells in the loop and remove one link.
Whole rows and columns
A1 notation can name more than a single cell. You can refer to a whole column with B:B, or a whole row with 3:3. These are shorthand ranges and are covered fully in the chapter on ranges. For now, treat an address as a single cell and a pair like B2:B10 as a block of cells between two corners.
The reference style is relative by default
An address such as B2 is a relative reference. That means Sheets remembers it as "the cell in this column, two rows down from the top", relative to the formula's position, rather than as a fixed place. The next chapters explain this in detail. What matters here is that writing a plain address is the starting point for all other reference types, and the way it behaves when you copy it depends on this default.
Finding the address of a cell
Several places show you the address of the selected cell.
- The name box, in the top-left of the toolbar area, shows the address of the active cell or the range you have selected.
- Column letters and row numbers appear on the grid headers, so you can read the address by looking at the edges.
- Typing an address in the name box and pressing Enter moves the selection to that cell. This is a quick way to jump across a large sheet. For example, typing
Z500takes you directly there.
Common mistakes with addresses
- Reversing the order.
3Bis not valid. Write the column first, then the row. - Adding spaces.
B 3is not an address. Sheets may read it as something else and show#NAME?. - Typing the letter O instead of zero. A reference such as
B1Ois not a cell address. Sheets treats it as a name it does not know and shows#NAME?. - Pointing at the wrong row after inserting data. If you insert a row above a referenced cell, Sheets updates the formula automatically to follow the cell. If you wanted the formula to keep pointing at the same position instead, you need a different approach, covered in the chapter on INDIRECT.
- Forgetting the equals sign. Typing
B2*C2without=stores plain text. The cell then shows the characters you typed instead of a result.
What happens when you insert or delete
References follow their cells. If B2 moves down because you inserted a row above it, a formula that pointed at B2 now points at B3, and the cell still contains the same data. If you delete the referenced cell's row, the formula has nothing to point at and shows #REF!. The chapter on reference errors shows how to repair this.
A worked example
You have a small order sheet.
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Item | Quantity | Unit price | Line total |
| 2 | Pens | 10 | 1.50 | |
| 3 | Notebooks | 4 | 3.25 |
In D2, type:
=B2*C2The result is 15. In D3, type:
=B3*C3The result is 13. Each formula reads the two cells in its own row. To check an address, click D3 and look at the colored borders: they should surround B3 and C3.
Now add a total in D4 using a range:
=SUM(D2:D3)The result is 28. If you change B2 to 20, D2 becomes 30 and D4 becomes 43. No formula was retyped. Only the input cell changed.
Summary of the rules
- An address is a column letter followed by a row number, with no space.
- A formula must start with
=to use an address. - A reference reads the value that a cell currently shows, including the result of another formula.
- Blank cells count as zero in arithmetic.
- A cell cannot refer to itself, directly or through a chain.
- A plain address like
B2is relative, which matters as soon as you copy the formula.
Exercise
In a sheet, cell B5 holds 8 and cell C5 holds 5. You type =C5-B5 in D5. What does D5 show, and what happens to D5 if you then change B5 to 2?
Show answer
D5 first shows -3, because 5 - 8 = -3. After B5 changes to 2, D5 recalculates to 3, because 5 - 2 = 3. The formula keeps reading the current values of the cells it points to.
Exercise
A colleague types B2*C2 in D2 and sees the text B2*C2 instead of a number. Another colleague types =2B*C2 and sees an error. What is wrong in each case?
Show answer
The first formula is missing the leading =, so Sheets stores it as plain text. The second uses 2B, which reverses the order. The column letter must come first, so the address should be B2.