Statistical FunctionsBeginner

Average Covers on Open Days Only with AVERAGEIF

A till export records a closed day as zero covers, and AVERAGE counts that zero as a very quiet day. AVERAGEIF lets you say which rows belong in the average, so the closed days stop dragging the figure down.

Task:

You manage a small bistro and are drawing up next week's staff rota. The till export in A2:C12 lists the last eleven days and the number of covers (diners served) each day. The bistro is closed on Mondays, and the till still writes a row for those days with 0 covers. In F2, work out the average covers on a day the bistro was actually open. Then, in F4, work out the average covers for the day of the week named in F3, so the rota can be planned one day at a time. F4 should update if someone types a different day, such as Sat, into F3.

Interactive Spreadsheet

Hints

+5 XPno-hints bonus

Solve it on your own to keep the bonus. Each hint gets one step closer to the formula.

The data in this exercise

This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.

12 rows × 6 columns2 cells you fill in
ABCDEF
1DateDayCovers
211/9/2026Mon0Average per open day
311/10/2026Tue58DayThu
411/11/2026Wed76Average on that day
511/12/2026Thu92
611/13/2026Fri141
711/14/2026Sat160
811/15/2026Sun104
911/16/2026Mon0
1011/17/2026Tue63
1111/18/2026Wed73
1211/19/2026Thu88
What this exercise teachesMay contain the answer

AVERAGE has no way of knowing that a 0 means the doors were locked rather than a dead evening, so AVERAGE(C2:C12) divides 855 covers by all 11 days and reports about 77.7. Staff a rota to that and every open day runs short by roughly seventeen diners. AVERAGEIF(C2:C12,">0") applies the condition first: only cells greater than zero are added and only they are counted, so the two Mondays leave both the total and the divisor, and the answer is 855 over 9 open days, which is 95. The criterion has to be in quotes because it is text that AVERAGEIF reads as a test, not a number. Leaving the Monday cells blank would have worked too, since AVERAGE skips empty cells, but you rarely control how a till exports its data, and filtering the zeros out in the formula means the sheet is right whatever the export does. F4 uses the three-argument form: the criterion is tested against one column and the values are taken from another. AVERAGEIF(B2:B12,F3,C2:C12) keeps the rows whose Day matches F3, here the two Thursdays with 92 and 88 covers, and averages their covers to 90. Because the formula points at F3 instead of having "Thu" typed into it, the same cell answers for any day: Sat gives 160, and Mon gives 0, which is the honest answer for a day the bistro does not open.