Sub topic 2
Naming Cells with A1 Notation
Google Sheets uses A1 notation to identify cells. An A1 reference combines a column label with a row number. For example, B2 means the cell in column B and row 2.
Assume you can open and edit a spreadsheet, enter values into cells, and use basic arithmetic operators such as +, -, *, and /.
Reading a cell reference
Columns use letters. Rows use numbers. The column label comes first, so C5 means column C, row 5. The reference does not describe the cell's value. It describes the cell's location.
| Reference | Meaning |
|---|---|
| `A1` | Column A, row 1 |
| `D7` | Column D, row 7 |
| `AA3` | Column AA, row 3 |
| `Z100` | Column Z, row 100 |
Column labels continue after Z. The next column is AA, followed by AB, AC, and so on. You can see a cell's A1 reference by selecting it and looking at the name box above the sheet, to the left of the formula bar.
A formula starts with =. It can use a cell reference instead of typing a value directly. Suppose B2 contains 8 and C2 contains 5. Enter this formula in D2:
=B2*C2Google Sheets reads the formula as “multiply the value in B2 by the value in C2.” If either input changes, the result updates automatically.
Referring to ranges
A range is a group of cells. A colon separates the first and last cell in a continuous range.
B2:B10 means every cell in column B from row 2 through row 10. It includes B2, B3, B4, and all the cells through B10.
=SUM(B2:B10)This formula adds all values in that range. A range can extend across columns and rows. For example, A1:C3 describes a rectangle containing three columns and three rows.
When selecting a range in a formula, you can type its reference or drag across the cells with your pointer. Selecting the range helps prevent typing the wrong row or column.
Choosing the right reference
A reference is useful when the position of the data matters. For example, a sales table might place quantities in column B, prices in column C, and totals in column D. The formula in D2 can refer to B2 and C2 instead of repeating their current values.
The reference B2 identifies one cell. The range B2:B10 identifies several cells. Google Sheets also supports references to entire columns, such as B:B, but broad references can include headers or unrelated values. Use a specific range when the data boundaries are known.
A reference can also include a sheet name. If the sheet is named Sales Data, this reference points to cell B2 on that sheet:
='Sales Data'!B2The single quotation marks are needed here because the sheet name contains a space. Sheet references are especially useful when one sheet stores input data and another sheet contains calculations.
Checking references before copying
A1 notation identifies the starting location of a formula. When you copy or fill a formula, Google Sheets can adjust ordinary references to match the new location. For example, a formula in D2 that uses B2 may refer to B3 when filled into D3. The next chapter examines this behavior in detail.
Before copying a formula, check that each reference points to the intended kind of data. A formula can be syntactically valid while pointing to the wrong cell.
Exercise
Cell B2 contains 12 and cell C2 contains 4. Write a formula for D2 that divides B2 by C2.
Show answer
Enter =B2/C2 in D2.