Spreadsheet Practice

COUNTIF formula generator

Describe what you need and get a working COUNTIF formula for Excel and Google Sheets, tested on real data before you copy it. COUNTIF counts the cells in a range that meet one condition: tickets marked "Open", scores of 70 or more, product names containing "lamp".

Tested COUNTIF examples

Each formula below was calculated on its own sample sheet. Open one to see the sheet, why it works, and to try it yourself.

Count attendance

=COUNTIF(B2:F2,"P")

Excel · result on the sample sheet: 6 rows (G2:G7)

Count checkboxes

=COUNTIF(C2:C9,TRUE)

Google Sheets · result on the sample sheet: 5

Questions

What does the COUNTIF formula generator do?

You describe the task in plain English, and it writes the formula, using COUNTIF where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.

What does COUNTIF do?

COUNTIF counts the cells in a range that meet one condition: tickets marked "Open", scores of 70 or more, product names containing "lamp".

Can I learn to write COUNTIF formulas myself?

Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the COUNTIF function page has a practice exercise.

More formula generators