Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
SORTBY. SORTBY(array, by_array1, order1, [by_array2, order2], …) sorts array by other ranges of the same height, which don't have to be part of the result. The first pair decides the order, and the next pair breaks ties within it. order is 1 for ascending and -1 for descending.
=SORTBY(B2:B40,D2:D40,1,E2:E40,-1)
Category buyers each read their own block of the product list, best seller first. The list in the buyers' pack shows only product and category, and leaves out the revenue figures.
In H2, return Product and Category (B2:C25) sorted by Category A to Z, and within each category by Revenue 2025 (column F) from highest to lowest. The revenue column must not appear in the result. The headers are in H1:I1.
| A | B | C | D | E | F | G | H | I | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | ID | Product | Category | Unit cost | List price | Revenue 2025 | Product | Category | |
| 2 | 101 | Copy Paper A4 (500) | Paper & Print | $3.10 | $5.50 | $2,791.53 | |||
| 3 | 102 | Recycled Paper A4 (500) | Paper & Print | $3.60 | $6.20 | $3,454.33 | |||
| 4 | 103 | Toner Cartridge Black | Paper & Print | $28.00 | $59.00 | $31,149.05 | |||
| 5 | 104 | Toner Cartridge Color | Paper & Print | $41.00 | $84.00 | $52,747.80 | |||
| 6 | 105 | Label Roll (1000) | Paper & Print | $4.20 | $9.90 | $7,097.31 | |||
| 7 | 106 | Envelope Box (250) | Paper & Print | $6.10 | $12.50 | $6,703.13 | |||
| 8 | 201 | Espresso Beans 1kg | Coffee & Kitchen | $11.50 | $24.00 | $31,681.20 | |||
| 9 | 202 | Filter Coffee 1kg | Coffee & Kitchen | $7.80 | $16.50 | $9,467.70 | |||
| 10 | 203 | Paper Cups (1000) | Coffee & Kitchen | $18.00 | $36.00 | $39,699.00 | |||
| 11 | 204 | Tea Assortment (200) | Coffee & Kitchen | $9.40 | $19.90 | $9,608.72 | |||
| 12 | 205 | Oat Milk 12-pack | Coffee & Kitchen | $10.20 | $21.50 | $18,523.33 | |||
| 13 | 206 | Sugar Sticks (1000) | Coffee & Kitchen | $5.30 | $11.00 | $6,827.70 | |||
| 14 | 301 | All-Purpose Cleaner 5L | Cleaning | $6.70 | $14.00 | $8,064.70 | |||
| 15 | 302 | Hand Soap Refill 5L | Cleaning | $8.10 | $17.50 | $11,970.88 | |||
| 16 | 303 | Paper Towels (24) | Cleaning | $12.40 | $25.00 | $14,720.00 | |||
| 17 | 304 | Trash Bags (200) | Cleaning | $7.20 | $15.00 | $9,886.50 | |||
| 18 | 305 | Disinfectant Wipes (12) | Cleaning | $9.80 | $21.00 | $7,663.95 | |||
| 19 | 306 | Microfiber Cloths (50) | Cleaning | $11.00 | $23.50 | $13,516.03 | |||
| 20 | 401 | Ballpoint Pens (50) | Desk Supplies | $4.40 | $9.50 | $4,510.60 | |||
| 21 | 402 | Sticky Notes (24) | Desk Supplies | $5.60 | $12.00 | $7,342.80 | |||
| 22 | 403 | Stapler Heavy Duty | Desk Supplies | $9.90 | $22.00 | $10,747.00 | |||
| 23 | 404 | Whiteboard Markers (12) | Desk Supplies | $6.30 | $13.50 | $8,565.75 | |||
| 24 | 405 | Desk Organizer | Desk Supplies | $8.70 | $19.00 | $10,554.50 | |||
| 25 | 406 | Notebook A5 (10) | Desk Supplies | $7.10 | $15.50 | $8,703.25 | |||
| 26 | |||||||||
| 27 | |||||||||
| 28 | |||||||||
| 29 | |||||||||
| 30 | |||||||||
| 31 | |||||||||
| 32 | |||||||||
| 33 |
=IF(B2>=1.5,SUM(C2:C9),0)Language
Full plan
Excel ✓ · SQL and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe