Sub topic 1
Cells, Ranges, Rows, Columns, and Sheets
Prerequisites
This chapter assumes you can sign in to a Google account and open Google Sheets in a web browser. It also assumes you know basic mouse and keyboard use, such as copy and paste. You do not need to know any formulas yet.
The building blocks
A Google Sheets file is called a spreadsheet. It holds one or more sheets, which are the tabs along the bottom of the window. Each sheet is a grid of rows and columns, and each box in the grid is a cell.
- A cell holds one value or one formula.
- A row is a horizontal line of cells. Rows are numbered 1, 2, 3, and so on down the left edge.
- A column is a vertical line of cells. Columns are labeled A, B, C, and so on across the top. After Z come AA, AB, and so on.
- A range is a group of cells treated as one unit, such as a block of sales figures.
- A sheet is one grid inside the spreadsheet. A spreadsheet can hold many sheets.
Cell addresses
Every cell has an address made from its column letter and its row number. The cell in column B and row 3 is B3. The column letter always comes first.
The address of the selected cell appears in the name box, at the top left above the grid. You can also type an address into the name box and press Enter to jump straight to that cell. This is the quickest way to move around a large sheet.
Cell addresses matter because formulas use them. A formula such as =B2*$E$1 refers to other cells by address, not by their contents. Later chapters cover this in detail. For now, remember that an address names a place, not a value.
Ranges
A range is written as the first cell, a colon, and the last cell. The range B2:B10 covers the nine cells in column B from row 2 to row 10. The range A1:C3 covers a rectangle three columns wide and three rows tall, which is nine cells.
A range is always a rectangle. You can write a range that covers a whole column (B:B) or a whole row (3:3). A range like B2:B starts at B2 and runs to the bottom of the column, so it also covers rows you add later.
The first formula in this tutorial uses a range:
=SUM(B2:B10)This formula adds the numbers in cells B2 through B10. The colon means "through".
Referring to other sheets
To use a cell or range from another sheet, put the sheet name and an exclamation mark before the address, such as Sales!B2:B10. If the sheet name has spaces, wrap it in single quotes: 'Q1 Sales'!B2. Renaming a sheet updates formulas that refer to it, so the references keep working.
Selecting cells and ranges
Selection decides which cells your next action affects. Formatting, deleting, and pasting all apply to what is selected.
| Goal | How to do it |
|---|---|
| Select one cell | Click it, or move with the arrow keys |
| Select a range | Click the first cell and drag to the last. Or click the first cell, hold Shift, and click the last. |
| Extend a selection with the keyboard | Hold Shift and press an arrow key |
| Select a whole column | Click the column letter |
| Select a whole row | Click the row number |
| Select the whole sheet | Click the blank square at the top left, or press Ctrl+A (Cmd+A on Mac) |
| Select cells that are not touching | Hold Ctrl (Cmd on Mac) and click or drag each one |
| Jump to the edge of your data | Press Ctrl+arrow key (Cmd+arrow key on Mac) |
| Select to the edge of your data | Press Ctrl+Shift+arrow key (Cmd+Shift+arrow key on Mac) |
The last two rows are the fastest way to work with long lists. Click the top cell of a column of data and press Ctrl+Shift+Down. The selection stops at the last filled cell, or at the first gap if there is one.
Active cell versus selection
When you select a range, one cell in it is the active cell. It stays white while the rest of the range is shaded. If you start typing, the text goes into the active cell only. The other selected cells are not changed. This is a common surprise: you select ten cells, type a value, and only one cell changes. Formatting is different. It applies to every selected cell.
Working with rows and columns
Selecting a row or column lets you act on all of it at once. Right-click the row number or column letter to see the menu. From there you can insert rows or columns, delete them, hide them, or resize them. Inserting shifts the existing data over to make room, and formulas that refer to the shifted cells update their addresses automatically.
Deleting a row or column is different from clearing it. Deleting removes the cells and shifts the rest of the sheet. Clearing (pressing Delete on a selection) empties the cells but leaves the grid unchanged.
A later chapter covers inserting, resizing, hiding, and freezing in more detail.
Working with sheets
The tabs at the bottom let you manage sheets. Click the plus button to add one. Right-click a tab to rename, duplicate, delete, copy to another spreadsheet, change the tab color, protect, hide, or move it left or right. You can also drag a tab to reorder it.
Use separate sheets to keep different kinds of data apart, such as one sheet for raw data and another for a summary. Give each sheet a clear name. Names like Raw data and Summary are easier to use in formulas than Sheet1 and Sheet2.
Size limits
A spreadsheet has a limit of 10 million cells across all its sheets. Adding empty rows and columns counts toward that limit, because empty grid cells are still cells. A new sheet starts with 1,000 rows and 26 columns. If you never need the extra space, deleting unused rows and columns keeps the file lighter. Google can change these limits, so check the current Sheets documentation if you work with very large files.
Common errors
- Typing in the wrong cell. Check the name box before you type. The active cell is the one with the thick blue border.
- Formatting only part of a range. Select the whole range first. Formatting applies to the selection, not to the data around it.
- Selecting across a gap. Ctrl+Shift+Down stops at the first blank cell. If your data has blanks, press it again to continue, or select the whole column instead.
- Breaking references by deleting. See the warning above. Clear the values instead of deleting rows or columns when formulas depend on them.
- Mixing up row and column order. An address is column first, then row.
3Bis not valid. UseB3. - Forgetting quotes around sheet names with spaces.
Q1 Sales!B2fails. Use'Q1 Sales'!B2.
Putting it together
Imagine a sheet named Orders with headers in row 1 and order amounts in B2:B10. To total them, click a blank cell, type =SUM(B2:B10), and press Enter. If you later insert a new row in the middle of the list, the formula grows to cover it. If you delete the whole of column B, the formula breaks. Knowing how addresses, ranges, and selections behave helps you predict both results before you act.
Exercise
A sheet has data in A1:D50. You click A1, hold Shift, and click D50. Then you type the word "Done". Which cells now contain "Done", and which cell would change if you applied bold at the same moment instead?
Show answer
Only A1 contains "Done", because typing goes into the active cell, which is the first cell you clicked. If you applied bold instead, all 200 cells in A1:D50 would become bold, because formatting applies to the whole selection.
Exercise
Write the range that covers columns B and C from row 2 to row 100, and then write a reference to cell B2 on a sheet named "Q1 Sales".
Show answer
The range is B2:C100. The cross-sheet reference is 'Q1 Sales'!B2, with single quotes because the sheet name contains a space.