📗 Excel & Google Sheets for Students · Lesson 3 of 7

IF, COUNTIF and AVERAGEIF

Google Classroom

Label results and summarize by condition.

IF

=IF(C2>=70, "Pass", "Fail")
=IF(B2="", "Missing", B2*2)

IF(test, value if true, value if false). Text goes in quotation marks.

Nested IF and IFS

=IFS(C2>=90,"A", C2>=80,"B", C2>=70,"C", C2>=60,"D", TRUE,"F")

IFS checks conditions in order and returns the first true one. TRUE at the end is the “everything else” case.

Counting and summing by condition

=COUNTIF(D2:D200, "Yes")How many survey answers were Yes
=COUNTIF(C2:C40, ">=90")How many scores are 90 or more
=AVERAGEIF(B2:B200, "Biology", C2:C200)Average score for Biology majors
=SUMIF(A2:A50, "Food", B2:B50)Total spent on food
=COUNTIFS(B:B,"Senior", C:C,">=3.5")Several conditions at once

Tip

💡 Put the condition in a cell (like G1 = "Biology") and use AVERAGEIF(B:B, G1, C:C). Change G1 and the result updates — a mini dashboard.

✏️ Practice: your turn

  1. Label exam scores Pass/Fail with IF
  2. Convert scores to letter grades with IFS
  3. Count “Yes” answers in a survey column with COUNTIF
  4. Average a score by group with AVERAGEIF

✏️ Online spreadsheet: practice formulas without installing anything

🧠 Quick quiz

Answer all 4 questions correctly to mark this lesson as done.

1. =IF(A1>10,"Big","Small") with A1 = 7 gives…
2. Which counts cells meeting one condition?
3. AVERAGEIF(B:B, "Biology", C:C) averages…
4. In IFS, TRUE as the last condition means…

0 of 4 correct