Count cells that are not blank
=COUNTA(C2:C8)Excel · result on the sample sheet: 5
Describe what you need and get a working COUNTA formula for Excel and Google Sheets, tested on real data before you copy it. COUNTA counts every cell that isn't empty: text, numbers, dates, errors and even formulas that return empty text.
Each formula below was calculated on its own sample sheet. Open one to see the sheet, why it works, and to try it yourself.
=COUNTA(C2:C8)Excel · result on the sample sheet: 5
=SEQUENCE(COUNTA(B2:B30))Excel · result on the sample sheet: 8 rows (A2:A9)
=COUNTIF($B$2:$B$16,E2)/COUNTA($B$2:$B$16)Excel · result on the sample sheet: 5 rows (F2:F6)
=IF(COUNTA(B2:E2)=0,"No response","Answered")Excel · result on the sample sheet: 5 rows (F2:F6)
=COUNTA(UNIQUE(A2:A10))Excel · result on the sample sheet: 5
=COUNTIF(B2:G2,"P")/COUNTA(B2:G2)Excel · result on the sample sheet: 6 rows (H2:H7)
=COUNTIF(B2:B13,"Yes")/COUNTA(B2:B13)Excel · result on the sample sheet: 70.0%
=COUNTA(UNIQUE(FILTER(A2:A13,B2:B13=G1)))Excel · result on the sample sheet: 5
You describe the task in plain English, and it writes the formula, using COUNTA 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.
COUNTA counts every cell that isn't empty: text, numbers, dates, errors and even formulas that return empty text.
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 COUNTA function page has a practice exercise.