Level 1WelcomeProject, 3 min

A sales report in four formulas

The task

Here are 40 real-looking orders. In about two minutes you'll turn them into a report: every region, its sales, its order count and the winner. No copying and pasting, no pivot table.
  1. List every region onceIn E2, type =UNIQUE(B2:B41). One formula fills the whole list.
  2. Total sales for each regionIn F2, total Amount for every region in your list at once. In Google Sheets, a formula that works on a whole list goes inside ARRAYFORMULA: =ARRAYFORMULA(SUMIF(B2:B41, E2:E5, C2:C41)).
  3. Count the ordersIn G2, count orders per region the same way: COUNTIF inside ARRAYFORMULA.
  4. Name the winnerIn F7, find the region with the most sales: =XLOOKUP(MAX(F2:F5), F2:F5, E2:E5). Find the biggest number, then return the region next to it.

The data

The starting sheet. Cells outlined in green are where your formulas go.

ABCDEFG
1OrderRegionAmountRegionSalesOrders
22001West555
32002East140
42003South210
52004East345
62005Central240
72006South240Top region
82007Central135
92008East330
102009South65
112010South190
122011Central330
132012West345
142013Central290
152014South225
162015Central365
172016East185
182017Central170
192018West235
202019East170
212020Central245
222021South315
232022West220
242023South205
252024East135
262025Central75
272026East190
282027South330
292028South100
302029East170
312030East220
322031East260
332032South120
342033Central210
352034Central270
362035South205
372036South255
382037Central190
392038South125
402039South155
412040East210