The request

From Mei Morgan, Buyer
Your goal
Each price band has a lower bound in G2:G7 and an upper bound in H2:H7. In I2:I7, count the products whose unit_price (D2:D61) is at least the lower bound and below the upper bound, with COUNTIFS; write it once in I2 and fill down. In I8, add up I2:I7 as a check.
- Fill
I2:I8with the right valuesnot done yet - With formulas, not typed numbersnot done yet
- Use
COUNTIFSnot done yet
Your sheet
| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | product_id | name | category | unit_price | price band | from | to | products | ||
| 2 | 141 | Thatcher Acacia Dutch Oven | Kitchen | 13.99 | $0–50 | 0 | 50 | |||
| 3 | 142 | Upland Acacia Serving Platter | Kitchen | 38.99 | $50–100 | 50 | 100 | |||
| 4 | 143 | Pine Cast Iron Carafe | Kitchen | 289.00 | $100–150 | 100 | 150 | |||
| 5 | 144 | Hazel Porcelain Cutting Board | Kitchen | 129.00 | $150–200 | 150 | 200 | |||
| 6 | 145 | Cove Cast Iron Dutch Oven | Kitchen | 10.99 | $200–250 | 200 | 250 | |||
| 7 | 146 | Thatcher Cast Iron Bowl Set | Kitchen | 16.99 | $250–300 | 250 | 300 | |||
| 8 | 147 | Cedar Cast Iron Tumbler Set | Kitchen | 79.99 | Total | |||||
| 9 | 148 | Spruce Enamel Utensil Set | Kitchen | 239.00 | ||||||
| 10 | 149 | Hazel Stainless Dutch Oven | Kitchen | 109.00 | ||||||
| 11 | 150 | Linden Enamel Serving Platter | Kitchen | 19.99 | ||||||
| 12 | 151 | Glen Stoneware Carafe | Kitchen | 60.99 | ||||||
| 13 | 152 | Monroe Stoneware Utensil Set | Kitchen | 13.99 | ||||||
| 14 | 153 | Alder Acacia Dutch Oven | Kitchen | 72.99 | ||||||
| 15 | 154 | Vale Enamel Bowl Set | Kitchen | 11.99 | ||||||
| 16 | 155 | Tidewater Stainless Wine Glasses | Kitchen | 169.00 | ||||||
| 17 | 156 | Willow Acacia Knife Block | Kitchen | 53.99 | ||||||
| 18 | 157 | Oakley Enamel Dutch Oven | Kitchen | 109.00 | ||||||
| 19 | 158 | Hazel Porcelain Serving Platter | Kitchen | 179.00 | ||||||
| 20 | 159 | Driftwood Porcelain Carafe | Kitchen | 179.00 | ||||||
| 21 | 160 | Fairhaven Stoneware Cutting Board | Kitchen | 70.99 | ||||||
| 22 | 161 | Cove Jute Duvet Cover | Textiles | 219.00 | ||||||
| 23 | 162 | Oakley Jute Knit Throw | Textiles | 23.99 | ||||||
| 24 | 163 | Pine Cotton Area Rug | Textiles | 139.00 | ||||||
| 25 | 164 | Cove Wool Lumbar Pillow | Textiles | 52.99 | ||||||
| 26 | 165 | Weston Cashmere-Blend Quilt | Textiles | 25.99 | ||||||
| 27 | 166 | Harbor Wool Knit Throw | Textiles | 28.99 | ||||||
| 28 | 167 | Elm Cashmere-Blend Area Rug | Textiles | 86.99 | ||||||
| 29 | 168 | Upland Percale Lumbar Pillow | Textiles | 159.00 | ||||||
| 30 | 169 | Spruce Wool Duvet Cover | Textiles | 66.99 | ||||||
| 31 | 170 | Rowan Cashmere-Blend Throw Blanket | Textiles | 17.99 | ||||||
| 32 | 171 | Driftwood Percale Area Rug | Textiles | 27.99 | ||||||
| 33 | 172 | Maple Wool Throw Pillow | Textiles | 18.99 | ||||||
| 34 | 173 | Bramble Percale Quilt | Textiles | 139.00 | ||||||
| 35 | 174 | Vale Cashmere-Blend Knit Throw | Textiles | 18.99 | ||||||
| 36 | 175 | Glen Cotton Runner Rug | Textiles | 84.99 | ||||||
| 37 | 176 | Fairhaven Cotton Throw Pillow | Textiles | 78.99 | ||||||
| 38 | 177 | Delancey Cashmere-Blend Duvet Cover | Textiles | 169.00 | ||||||
| 39 | 178 | Sutton Wool Knit Throw | Textiles | 70.99 | ||||||
| 40 | 179 | Delancey Jute Area Rug | Textiles | 30.99 | ||||||
| 41 | 180 | Hazel Linen Throw Pillow | Textiles | 20.99 | ||||||
| 42 | 181 | Cedar Marble Bud Vase | Decor | 179.00 | ||||||
| 43 | 182 | Nantucket Brass Wall Mirror | Decor | 17.99 | ||||||
| 44 | 183 | Glen Glass Canvas Print | Decor | 189.00 | ||||||
| 45 | 184 | Thatcher Oak Candle | Decor | 17.99 | ||||||
| 46 | 185 | Ridge Brass Bud Vase | Decor | 12.99 | ||||||
| 47 | 186 | Birch Brass Floor Mirror | Decor | 20.99 | ||||||
| 48 | 187 | Ashford Oak Canvas Print | Decor | 149.00 | ||||||
| 49 | 188 | Fern Oak Candle Holder Set | Decor | 179.00 | ||||||
| 50 | 189 | Northfield Brass Bud Vase | Decor | 76.99 | ||||||
| 51 | 190 | Elm Brass Floor Mirror | Decor | 43.99 | ||||||
| 52 | 191 | Hazel Ceramic Canvas Print | Decor | 45.99 | ||||||
| 53 | 192 | Thatcher Marble Candle Holder Set | Decor | 15.99 | ||||||
| 54 | 193 | Delancey Brass Vase | Decor | 19.99 | ||||||
| 55 | 194 | Chester Brass Wall Mirror | Decor | 159.00 | ||||||
| 56 | 195 | Fairhaven Soy Wax Framed Print | Decor | 103.99 | ||||||
| 57 | 196 | Pine Glass Candle Holder Set | Decor | 25.99 | ||||||
| 58 | 197 | Ridge Soy Wax Vase | Decor | 109.00 | ||||||
| 59 | 198 | Harbor Oak Floor Mirror | Decor | 44.99 | ||||||
| 60 | 199 | Oakley Brass Framed Print | Decor | 104.99 | ||||||
| 61 | 200 | Cedar Ceramic Candle | Decor | 179.00 | ||||||
| 62 | ||||||||||
| 63 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
What Mei gets, and why
The lesson
An average hides the shape of the data. The 60 products on this sheet average $84.09. That could mean most of them cost about $84, or that many cost $20 and a few cost $250. A histogram shows which: it splits the range of values into equal bins and draws one column per bin, as tall as the number of values that fall in it.
Bins: lower bound in, upper bound out
Each band on the sheet has a lower bound (G) and an upper bound (H), both $50 apart. A price
belongs to a band when it is at least the lower bound and below the upper bound. That
rule puts every price in exactly one bin, including a price that sits exactly on a boundary.
| Band | Condition |
|---|---|
| $0–50 | price >= 0 and price < 50 |
| $50–100 | price >= 50 and price < 100 |
| … | … |
| $250–300 | price >= 250 and price < 300 |
COUNTIFS with two conditions on one column
COUNTIFS takes pairs of (range, criteria) and counts the rows that pass all of them. Both pairs
can test the same column:
I2 =COUNTIFS($D$2:$D$61,">="&G2,$D$2:$D$61,"<"&H2)
The & glues the operator to the number in the cell, building ">=0" and "<50". Keeping the
bounds in cells means you can try $25 bands later by changing two columns, not six formulas.
Then the check:
I8 =SUM(I2:I7)
I8 must be 60, one per product. Fewer means a price fell outside every bin (raise the top
bound); more means a price counted twice (an <= crept in).
Making it in Excel
Select F1:F7, hold Ctrl (Cmd on a Mac) and select I1:I7, then Insert → Charts → Column.
In Chart Design → Add Chart Element, add axis titles (“Price band”, “Products”). A histogram’s
columns traditionally touch: right-click a column → Format Data Series → Gap Width 0%.
Excel 2016 and later can also build it in one step from the raw prices: select D1:D61, then
Insert → Charts → Statistic → Histogram, and set the bin width to 50 under Format Axis.
Its bins work the other way around, upper bound in, lower bound out, so a price of exactly 50.00
would land in the first bin there. Google Sheets has a Histogram chart type too. The COUNTIFS
table is worth knowing because you control the bins and can reuse the counts in other formulas.
What the chart shows
The shape is lopsided. 26 of the 60 products, 43%, cost under $50, and the columns fall to 12 between $50 and $100, then 9 and 10 in the next two bands. Above $200 there are only 3 products: 2 between $200 and $250 and 1 between $250 and $300. This range is a cheap-items business with a thin premium tail. The tail also explains the average: half the products cost $68.99 or less (the median), but the few expensive ones pull the average up to $84.09. If Mei wants a “better” tier, the gap above $200 is where it would go.
Common mistakes
- Overlapping bins (
>=and<=on both ends): boundary values count twice. - Bins of different widths. A $0–50 bin next to a $50–300 bin makes the second look busier only because it is wider. Keep widths equal.
- Forgetting the
&.">=G2"is the text “greater than or equal to G2”, which matches nothing, and the bin count is 0. - Not checking the total.
I8is a one-second test that catches all of the above.
Lantern lit!
Practised: chartshistogramdistributionbinscountifs
- Solved
- No hints
- First run
