Understanding The AVERAGEIF function in ACARA Digital Technologies Years 9–10
What it does: Typing this formula next to the Year 9 version lets you compare the two group averages. Only the criterion changes. B2:B9 is checked for "Sport", and C2:C9 is the last argument, which holds the prices that get averaged. Rows that do not meet the criterion are skipped completely. They do not count as zero, so they do not drag the average down. The criterion range comes first and the range to average comes last. Swapping them checks the marks for the text "Year 10". Text criteria go inside straight double quotes. Without them, the spreadsheet will not read it correctly.
Common mistakes: The text criterion Y11 must be in double quotes. It should be =AVERAGEIF(A2:A9,"Y11",C2:C9). The ranges are swapped. The first range holds the group to test (column A) and the last range holds the numbers to average (column C). It should be =AVERAGEIF(A2:A9,"Gold",C2:C9).
Quick Questions
1. Which formula finds the average of the marks in C2:C50 for only the Year 9 students listed in A2:A50?
A. =AVERAGEIF(A2:A50,"Year 9",C2:C50) ✓
B. =AVERAGE(A2:A50,"Year 9",C2:C50)
AVERAGEIF checks a criterion first. AVERAGE has no criterion, so it cannot pick out only the Year 9 rows.
2. In =AVERAGEIF(A2:A50,"Year 9",C2:C50), which range holds the values that get averaged?
A. A2:A50, the first range
B. C2:C50, the last range ✓
The first range is where the criterion is checked. The last range is the numbers that are averaged.
3. What does AVERAGEIF do with a row where column A says "Year 10" when the criterion is "Year 9"?
A. It counts that row's value as 0
B. It leaves that row's value out of the average ✓
Rows that do not meet the criterion are skipped completely. They do not count as zero, so they do not drag the average down.
4. Which formula gives the average mark for just the Year 10 group?
A. =AVERAGEIF(A2:A50,"Year 10",C2:C50) ✓
B. =AVERAGEIF(C2:C50,"Year 10",A2:A50)
The criterion range comes first and the range to average comes last. Swapping them checks the marks for the text "Year 10".
5. A teacher wants to compare how two groups performed. What is the best way to use AVERAGEIF?
A. Write one AVERAGEIF for each group and compare the two results ✓
B. Write one AVERAGEIF and it shows every group's average at once
One AVERAGEIF gives one group's mean. Use a separate formula for each group, then compare the answers.
Fill in the Blanks
1. =AVERAGEIF(A2:A50,"Year 9",C2:C50)
Hint: Type the function name that averages only the values meeting a condition.
2. =AVERAGEIF(A2:A50,"Year 9",C2:C50)
Hint: Type the range that holds the group labels the criterion is checked against.
3. =AVERAGEIF(A2:A50,"Year 9",C2:C50)
Hint: Type the range of numbers that will be averaged for the matching rows.
4. =AVERAGEIF(A2:A50,"Year 9",C2:C50)
=AVERAGEIF(A2:A50,"Year 10",C2:C50)
Hint: Type the range of marks to average, the same one used for the first group, so the groups can be compared.
5. =AVERAGEIF(B2:B30,"Boys",D2:D30)
=AVERAGEIF(B2:B30,"Girls",D2:D30)
Hint: Type the function name used to find the average for a second group so the two groups can be compared.
Spot the Error
Question 1
A
=AVERAGE(C2:C9)
B
=AVERAGEIF(A2:A9,"Y9",C2:C9)
C
=AVERAGEIF(A2:A9,"Y10",C2:C9)
D
=AVERAGEIF(A2:A9,Y11,C2:C9)
Line D — The text criterion Y11 must be in double quotes. It should be =AVERAGEIF(A2:A9,"Y11",C2:C9).
Question 2
A
=AVERAGEIF(A2:A9,"Red",C2:C9)
B
=AVERAGEIF(A2:A9,"Blue",C2:C9)
C
=AVERAGEIF(C2:C9,"Gold",A2:A9)
Line C — The ranges are swapped. The first range holds the group to test (column A) and the last range holds the numbers to average (column C). It should be =AVERAGEIF(A2:A9,"Gold",C2:C9).
Question 3
A
=AVERAGEIF(A2:A9,"Red",C2:C9)
B
=AVERAGEIF(A2:A9"Blue",C2:C9)
C
=AVERAGEIF(A2:A9,"Gold",C2:C9)
Line B — There is a missing comma between the criteria range and the criterion. It should be =AVERAGEIF(A2:A9,"Blue",C2:C9).
Question 4
A
=AVERAGE(C2:C9)
B
=SUMIF(A2:A9,"Y10",C2:C9)
C
=AVERAGEIF(A2:A9,"Y11",C2:C9)
Line B — SUMIF adds the Year 10 marks together, but we want the mean mark for the group. It should be =AVERAGEIF(A2:A9,"Y10",C2:C9).
Question 5
A
=AVERAGEIF(B2:B9,"15>",C2:C9)
B
=COUNTIF(B2:B9,">15")
C
=AVERAGE(C2:C9)
Line A — The comparison operator must come before the number inside the quotes. It should be ">15", not "15>".