How to Count Yes, No and Ticks in Excel
By ExcelReady TeamUpdated 6 min read
The short answer
To count Yes answers in Excel, use COUNTIF with the word in quotes: =COUNTIF(B2:B8,"Yes"). It counts yes, Yes and YES alike. Use "No" for No answers and "" for blanks. For checkboxes, which store TRUE or FALSE, use =COUNTIF(B2:B8,TRUE). For tick symbols, count the symbol itself, such as =COUNTIF(B2:B8,"✓").
Key takeaways
- =COUNTIF(range,"Yes") counts Yes answers and ignores capitals.
- Divide by COUNTA for the share of Yes among people who answered, or by ROWS for the share of everyone.
- Checkboxes store TRUE and FALSE, so count them with =COUNTIF(range,TRUE).
- Count a tick by the character in the cell: "✓", or "ü" if the tick uses the Wingdings font.
- Extra spaces like "Yes " break the count; use a drop-down list to keep answers clean.
On this page+
To count Yes in Excel, use COUNTIF with the word in double quotes: =COUNTIF(B2:B8,"Yes"). The same formula counts No, Pending or any other answer, and with a small change it also counts ticked checkboxes and tick symbols. This guide covers each case, plus percentages and the spacing problems that make a Yes count come out wrong.
How to count Yes answers#
COUNTIF counts the cells in a range that match one condition. For Yes answers, the condition is the word "Yes":
=COUNTIF(range, "Yes")Every example uses this RSVP list in A1:B8:
| A | B | |
|---|---|---|
| 1 | Guest | Attending |
| 2 | Ana | Yes |
| 3 | Ben | No |
| 4 | Cara | Yes |
| 5 | Dan | |
| 6 | Eve | yes |
| 7 | Finn | No |
| 8 | Gia | Yes |
- Click an empty cell, such as D2.
- Type
=COUNTIF(B2:B8,"Yes"). - Press Enter.
The result is 4: Ana, Cara, Eve and Gia. Eve typed "yes" in lower case, but COUNTIF ignores capitals, so she counts. The quotes are required, because Yes is text. For more about COUNTIF criteria, see how to use COUNTIF.
How to count No answers and blanks#
Change the criteria to count the other answers:
| Question | Formula | Result |
|---|---|---|
| Said Yes | =COUNTIF(B2:B8,"Yes") | 4 |
| Said No | =COUNTIF(B2:B8,"No") | 2 |
| No reply yet | =COUNTIF(B2:B8,"") | 1 |
| Replied (any answer) | =COUNTIF(B2:B8,"<>") | 6 |
| Anything but Yes | =COUNTIF(B2:B8,"<>Yes") | 3 |
"" means empty, so it finds Dan's blank reply. "<>" means "not empty", which counts everyone who replied; COUNTA gives the same 6. Note that "<>Yes" includes the blank cell as well as the two No answers. The guide to COUNTIF not blank explains the blank and non-blank criteria in more detail.
A quick check: Yes + No + blank should equal the number of guests. Here 4 + 2 + 1 = 7. If the numbers don't add up, some cells hold a different word, like "Maybe", or a misspelling.
How to calculate the percentage of Yes#
Divide the Yes count by a total, then format the cell as a percentage (Windows: Ctrl+Shift+%; Mac: Control+Shift+%). Which total you use changes the answer:
| Question | Formula | Result |
|---|---|---|
| Share of replies that are Yes | =COUNTIF(B2:B8,"Yes")/COUNTA(B2:B8) | 67% |
| Share of all guests who said Yes | =COUNTIF(B2:B8,"Yes")/ROWS(B2:B8) | 57% |
The first divides 4 by the 6 people who replied. The second divides 4 by all 7 guests, treating Dan's missing reply as not Yes. Say clearly which one you report, because they answer different questions.
How to count ticked checkboxes#
A checkbox in Excel stores a logical value behind it: TRUE when it is ticked and FALSE when it isn't. In Microsoft 365 you can add checkboxes straight into cells with Insert > Checkbox. The cell itself then holds TRUE or FALSE. Older form-control checkboxes store the value in a linked cell instead, which you choose in Format Control.
Either way, count the ticks by counting TRUE, with no quotes:
=COUNTIF(B2:B8,TRUE)Use FALSE to count the unticked boxes. Don't put TRUE in quotes: "TRUE" looks for the text TRUE, which is not the same as the logical value a checkbox stores.
How to count tick symbols#
If the ticks are characters typed into cells, count the character itself. For a Unicode tick mark:
=COUNTIF(B2:B8,"✓")Many older sheets make a tick by typing the letter ü and setting the font to Wingdings, which draws ü as a tick. The cell still holds ü, so count that letter: =COUNTIF(B2:B8,"ü"), or =COUNTIF(B2:B8,CHAR(252)) if you can't type it easily. To find out which character a tick really is, click the cell and look at the formula bar, or use =UNICODE(B2), which returns 10003 for ✓ and 252 for ü.
Why a Yes count comes out too low#
When COUNTIF misses some Yes answers, the data is usually not quite what it seems. Check these:
- Extra spaces. "Yes " with a trailing space doesn't match "Yes". Test with
=COUNTIF(B2:B8,"*yes*"); if that is higher, spaces or extra words are the cause. Clean the column with TRIM. - Different words. "Y", "Yep" or "Confirmed" won't match "Yes". Decide on one answer and fix the others.
- Wrong range. Make sure the range covers every row, including any added at the bottom.
- Checkbox values counted as text. Use TRUE without quotes.
The best fix is to stop the problem at the source with a drop-down list. Select the answer cells, go to Data > Data Validation, choose List, and type Yes,No as the source. People then pick an answer instead of typing it, so every Yes is spelled the same way.
How to turn Yes and No into 1 and 0#
Sometimes you need Yes and No as numbers, for example to add them to a score or show them in a chart. A helper column does it. In C2, type this and fill down:
=IF(B2="Yes",1,0)The SUM of that column equals the COUNTIF result, 4. To skip the helper column, use SUMPRODUCT in one cell:
=SUMPRODUCT(--(B2:B8="Yes"))The comparison returns TRUE or FALSE for each row, -- turns them into 1s and 0s, and SUMPRODUCT adds them up, giving 4 again. This form is handy when the rule is more complex than COUNTIF allows, such as comparing two columns row by row.
Count Yes with a second condition#
To count Yes answers for one group only, use COUNTIFS. If column C held each guest's team, this counts the Yes replies from the Sales team:
=COUNTIFS(B2:B8,"Yes",C2:C8,"Sales")A row counts only when both conditions are TRUE. The same idea lets you build a small table of Yes counts by team, with each team name in a cell and the formula filled down. For other counting jobs, see how to count cells with text, how to count unique values and how to count duplicates.
Practise it#
Counting answers with COUNTIF is a quick win in any screening test. Practise COUNTIF in a live spreadsheet: you type the criteria and the lesson checks it instantly. Keep the COUNTIF function guide nearby for the syntax, and try the RSVP exercise on this page first.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
How many guests replied Yes? In D2, use COUNTIF on the replies in B2:B8.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Attending | ||||
| 2 | Yes replies | ||||
| 3 | No | ||||
| 4 | Yes | ||||
| 5 | Dan | ||||
| 6 | yes | ||||
| 7 | No | ||||
| 8 | Yes | ||||
| 9 | |||||
| 10 | |||||
| 11 |
Tip: The range comes first, then the word Yes in double quotes.
Practise this in a lesson
Frequently asked questions
How do I count the number of Yes in Excel?
Use =COUNTIF(B2:B8,"Yes"), replacing B2:B8 with your column. COUNTIF is not case-sensitive, so yes and YES are counted as well.
How do I calculate the percentage of Yes answers?
Divide the Yes count by the number of answers: =COUNTIF(B2:B8,"Yes")/COUNTA(B2:B8). Format the cell as a percentage. Divide by ROWS(B2:B8) instead if blanks should count as not Yes.
How do I count checkboxes that are ticked?
A ticked checkbox stores TRUE in its cell or linked cell, so use =COUNTIF(B2:B8,TRUE). Use FALSE to count the unticked boxes.
How do I count tick marks in Excel?
Count the character that makes the tick. For a Unicode tick, use =COUNTIF(B2:B8,"✓"). If the tick was made with the Wingdings font, the cell holds the letter ü, so use =COUNTIF(B2:B8,"ü").
Why is my Yes count lower than expected?
Some cells probably contain extra spaces, like Yes with a space after it, or a different word such as Y. Check with =COUNTIF(B2:B8,"yes"), then clean the data with TRIM or a drop-down list.