Counting tally marks
On the Survey sheet, you have vote counts that you counted by hand. But now the Answers sheet has each answer separately. The spreadsheet can count them by itself.
That’s what the COUNTIF function is for. It counts the cells that meet a condition.
=COUNTIF(where to look, what to look for)
Count the sandwiches
-
On the
Surveysheet, click on B2 (the votes for sandwich). -
Change it to
=COUNTIF(Answers!C2:C21,A2). -
You’ll see 8. The spreadsheet counted how many times the word from A2 (
sandwich) appears in column C on theAnswerssheet. -
Drag B2 down to B6. All the counts are now formulas.
That’s why we cleaned up! If there were a sandwhich typo in there, COUNTIF wouldn’t count it. A clean column C matters.
Now everything is connected: you change an answer on the Answers sheet → the count on Survey changes → the chart changes → the Dashboard changes.
The check
B8 on Survey (Total votes) must be 20, the same as the number of answers. If it’s less, some answer didn’t match the list (a typo, for example).
A pivot table
Google Sheets and Excel can also make a summary without formulas. That’s called a pivot table.
-
On the
Answerssheet, select A1:C21. -
Insert → Pivot table → New sheet → Create.
-
In the editor on the right, next to Rows, click Add and choose
Clean answer. -
Next to Values, click Add, choose
Number, and set it to COUNTA. -
You have a summary: each answer and how many times it appeared.
Your turn 💪
- The counts on
Surveyare COUNTIF formulas. - The total is 20.
- You tried a pivot table.
Done when: the spreadsheet counts the answers by itself.
What to take away from this lesson
- COUNTIF counts the cells that meet a condition.
- Clean data = correct counts.
- Everything is connected.
- A pivot table makes a summary without formulas.
© 2026 Ing. Martin Polak / AlgoRhino · Content usage terms