AnalystPracticeGuides
DashboardSign up

COUNT vs COUNTA vs COUNTIF: which Excel count function to use

COUNT counts numbers. COUNTA counts every cell that isn't empty. COUNTBLANK counts empty cells. COUNTIF counts cells that match one condition, and COUNTIFS counts rows that match several conditions. Picking the wrong one is one of the most common mistakes in Excel tests.

Watch it solved. Task 2: count above a mark (COUNTIF), from 1:21, in our video “Excel Interview Questions and Answers: 10 Practical Tasks, Solved”. Pressing play loads the video from YouTube (privacy). Open on YouTube

Which function counts what?

FunctionCountsExample
COUNTCells with numbers (dates count too, because Excel stores them as numbers)=COUNT(C2:C20)
COUNTACells that are not empty: numbers, text, errors=COUNTA(A2:A20)
COUNTBLANKEmpty cells=COUNTBLANK(D2:D20)
COUNTIFCells that match one condition=COUNTIF(B2:B20,"Open")
COUNTIFSRows that match all conditions=COUNTIFS(B2:B20,"Open",C2:C20,"Billing")

Why does COUNT return 0 on a column of names?

Because COUNT only counts numbers, and names are text. To count how many names are in the list, use COUNTA. This is the classic trap in interview tasks such as "How many employees are on the list?"

Why does COUNT miss some numbers?

Numbers stored as text, often from a CSV or system export, are not counted by COUNT. They usually sit on the left side of the cell and show a small green triangle. Convert them first (for example with VALUE, or Data, Text to Columns), then count.

Why does COUNTA count cells that look empty?

A formula that returns empty text, such as =IF(A2="","",A2), makes the cell look empty, but COUNTA still counts it. COUNTBLANK treats that cell as blank. If your totals don't add up, look for formulas like this, and for cells that contain only a space.

How do you count with conditions?

Open tickets: =COUNTIF(B2:B20,"Open")

Orders over 100: =COUNTIF(C2:C20,">100")

Open tickets in the billing team (both conditions): =COUNTIFS(B2:B20,"Open",C2:C20,"Billing")

How do you count unique values?

In Excel for Microsoft 365 and Excel 2021 or later: =COUNTA(UNIQUE(A2:A20)). In older versions, a pivot table with "Distinct Count" (when you add the data to the Data Model) or a helper column does the job.

Try it yourself. Practise every count function in a real spreadsheet with instant feedback.
Practise COUNT and COUNTA Practise COUNTIFS

← All free guides