Mission M01 · Excel · 10 min
Count online orders lines in the South
Request from your manager
Welcome to Sunshine Grocers! Diana, the e-commerce manager, wants to know how busy online shopping was in the South region last year. She asks: how many sales lines in 2025 came from the Online channel in the South region?
Data
Download the practice file(s):
Steps
- Open sales_flat.csv in Excel, click any cell in the data and press Ctrl+T to turn it into a table (check 'My table has headers').
- Click the filter arrow on order_date and use Date Filters > Between… to keep 1/1/2025 through 12/31/2025 (or uncheck 2024 in the year list).
- Filter the channel column to show only Online.
- Filter the region column to show only South.
- Read the count in the status bar at the bottom ('x of 28742 records found'), or type =SUBTOTAL(3,Table1[order_id]) in an empty cell to count visible rows.
Check your answer
How many sales lines were Online, in the South region, in 2025?
Show solution
After filtering 2025 + Online + South, 799 rows remain. SUBTOTAL with function 3 (COUNTA) counts only visible rows, so it changes as you change the filters, unlike COUNTA.
=SUBTOTAL(3,Table1[order_id])
' Without filters, one formula:
=COUNTIFS(Table1[channel],"Online",Table1[region],"South",Table1[order_date],">="&DATE(2025,1,1),Table1[order_date],"<="&DATE(2025,12,31))Answer: 799 rows