The request

From Jessica Turner, Merchandising Manager
Your goal
In G2:G5, use functions over the price column D2:D21: G2 the total of all prices (SUM), G3 the average price (AVERAGE), G4 the lowest price (MIN), G5 the highest price (MAX).
- Fill
G2:G5with the right valuesnot done yet - With formulas, not typed numbersnot done yet
- Use
SUMAVERAGEMINMAXnot done yet
Your sheet
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | product_id | name | subcategory | unit_price | Measure | Value | ||
| 2 | 121 | Bramble Ceramic Floor Lamp | Floor Lamps | 31.99 | Total of all prices | |||
| 3 | 122 | Monroe Glass Desk Lamp | Table Lamps | 29.99 | Average price | |||
| 4 | 123 | Sutton Brass Chandelier | Pendants | 30.99 | Cheapest | |||
| 5 | 124 | Marlow Glass Wall Sconce | Sconces | 349.00 | Most expensive | |||
| 6 | 125 | Pacifica Black Metal Arc Lamp | Floor Lamps | 279.00 | ||||
| 7 | 126 | Fern Rattan Desk Lamp | Table Lamps | 379.00 | ||||
| 8 | 127 | Dune Black Metal Pendant Light | Pendants | 189.00 | ||||
| 9 | 128 | Delancey Black Metal Wall Sconce | Sconces | 54.99 | ||||
| 10 | 129 | Dune Ceramic Arc Lamp | Floor Lamps | 109.00 | ||||
| 11 | 130 | Pacifica Black Metal Table Lamp | Table Lamps | 409.00 | ||||
| 12 | 131 | Ashford Linen Pendant Light | Pendants | 349.00 | ||||
| 13 | 132 | Fairhaven Brass Wall Sconce | Sconces | 189.00 | ||||
| 14 | 133 | Dune Black Metal Floor Lamp | Floor Lamps | 51.99 | ||||
| 15 | 134 | Sable Linen Table Lamp | Table Lamps | 92.99 | ||||
| 16 | 135 | Ridge Ceramic Chandelier | Pendants | 159.00 | ||||
| 17 | 136 | Quarry Rattan Picture Light | Sconces | 159.00 | ||||
| 18 | 137 | Marlow Linen Floor Lamp | Floor Lamps | 219.00 | ||||
| 19 | 138 | Oakley Brass Table Lamp | Table Lamps | 199.00 | ||||
| 20 | 139 | Rowan Ceramic Chandelier | Pendants | 189.00 | ||||
| 21 | 140 | Quarry Ceramic Picture Light | Sconces | 329.00 | ||||
| 22 | ||||||||
| 23 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
What Jessica gets, and why
The lesson
Adding twenty prices with =D2+D3+D4+… works, but it is long, easy to break, and does not grow
when rows are added. Functions do this work for you. A function has a name, then its inputs
in brackets:
=SUM(D2:D21)
Ranges
D2:D21 is a range: every cell from D2 down to D21, written as the first cell, a colon
and the last cell. A range can be a column (D2:D21), a row (B2:F2) or a block (B2:D21). Click
a cell in the sheet and the formula bar shows which one you are in; selecting from D2 to D21
with Shift+click shows the range in the name box on the left.
The four everyday summaries
| Function | What it returns |
|---|---|
=SUM(D2:D21) |
all the numbers added up |
=AVERAGE(D2:D21) |
the sum divided by how many numbers there are |
=MIN(D2:D21) |
the smallest number |
=MAX(D2:D21) |
the largest number |
On the lighting range, MIN and MAX tell Jessica the price span at a glance: from 29.99 up
to 409.00. The average sits far above the cheapest items,
because a few expensive pieces pull it up. That is worth saying out loud in a pricing meeting:
an average describes the range, not a typical product.
What functions skip
SUM, AVERAGE, MIN and MAX look only at numbers inside a range. Text and empty cells are
ignored. That is convenient (the header unit_price in D1 would be skipped even if you included
it) and also a trap:
- an empty cell is left out of
AVERAGE, which is usually what you want: an unknown price is not a price of zero; - a cell holding 0 is included, and drags the average down;
- a number stored as text (often from a messy export, shown left-aligned) is skipped by all four, so totals come out too low without any error.
When a total looks low, check that every value in the column is right-aligned. Numbers align right, text aligns left.
Typing functions
Function names are not case-sensitive: =sum(d2:d21) is accepted and Excel rewrites it as
=SUM(D2:D21). While you type a formula, you can click a cell to insert its address instead of
typing it.
Common mistakes
- Including the header or a total row in the range. A range like
D2:D22that also covers a total in row 22 counts that total twice. - Stopping the range early.
D2:D20misses the last product. Check the last row number. - Typed numbers. Copying the result of a calculator into
G2gives the right number today and a stale one next week. The checker asks for formulas. - Writing
=SUM(D2+D21). The plus adds just two cells. A range needs the colon.
Lantern lit!
Practised: functionsrangessumaveragemin max
- Solved
- No hints
- First run
