Ranges
A range is a group of cells. You write it as the first and last cell addresses separated by a colon.
Writing a range
B2:B5 is the 4 cells from B2 to B5. A1:C3 is a 3×3 rectangle — 9 cells.
Selecting a range
Drag with the mouse or press Shift + arrow. Ctrl + Shift + arrow selects all the way to the end of the data.
Ranges in functions
Many functions take a range: =SUM(B2:B5), =AVERAGE(B2:B5). Separate non-adjacent ranges with commas (semicolons in some locales): =SUM(B2:B3,B5).
Example
Formula:
=SUM(B2:B5)→ result: 4680
Try it in the simulator
Select B2:B5 and look at the status bar. Then type =SUM(B2:B5) into B6.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Month | Sales | ||||||||||||||||||||||
| 2 | January | 1200 | ||||||||||||||||||||||
| 3 | February | 950 | ||||||||||||||||||||||
| 4 | March | 1430 | ||||||||||||||||||||||
| 5 | April | 1100 | ||||||||||||||||||||||
| 6 | ||||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 |