How to Use COUNTA in Excel

If you just need to use counta in excel and move on, the boxed answer at the top is all you need. The rest of this page is for when you want to understand why it works in Excel, adapt it to a trickier version, or make it robust enough to hand to a colleague. We keep the opening short on purpose — the depth is here when you want it, not in your way when you don’t.

Exact answer

In Excel: use =COUNTA(range) — it counts every cell that is not empty, whatever it contains, which makes it the function for sizing a list.

On this page8

Syntax

=COUNTA(value1, [value2], ...)

Arguments

Argumentrequired / optionalDescription
value1requiredThe first range or value. Every non-empty cell is counted.
value2, ...optionalFurther ranges or values.

Related functions

COUNTCOUNTBLANKCOUNTIF
ƒxCell CounterLive

Operators >, >=, <, <=, <> and the * / ? wildcards all work, exactly as in Excel. Matching is case-insensitive.

Not blank (COUNTA)
6
Not blank (COUNTA)
6
Numbers (COUNT)
3
Text cells
3
Blank (COUNTBLANK)
2

8 cells read

=COUNTA(A2:A9)

COUNT only counts numbers; COUNTA counts anything that is not blank. A number stored as text is text to both.

Ctrl+CthenCtrl+Shift+V⌘+Cthen⌘+Ctrl+VPaste values · WindowsMac

What this does

COUNTA counts non-empty cells regardless of content: numbers, text, dates, logicals and error values all count. The one thing to watch is that a formula returning an empty string is not actually empty — the cell contains a formula, so COUNTA counts it. That is why a column of =IF(A2="", "", …) formulas reports a full count even though it looks blank. Where the goal is genuinely visible entries, COUNTIF with "<>" or a SUMPRODUCT test on the length is more honest. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. Treat “use counta in excel” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected cells shows up while it is still harmless. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That turns a calculation you can defend to a CFO or an auditor into a method you can reuse, explain, and defend when the workbook leaves your screen.

A worked example

A name column A2:A500 with gaps: =COUNTA(A2:A500) returns how many rows actually have a name, which is the list size. If column B holds =IF(A2="","",A2) formulas, =COUNTA(B2:B500) returns 499 regardless — use =COUNTIF(B2:B500,"<>") minus the empty-string count, or =SUMPRODUCT(--(LEN(B2:B500)>0)), to count only the visible entries. COUNTA is how you measure the real size of a list, provided you know it counts formula-produced blanks too. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.

In Google Sheets

The standard worksheet functions used by this example are listed in Google Sheets. Check the cell references, argument separators and input types in the target spreadsheet, then compare the worked result. This formula-availability check does not establish identical menus, keyboard shortcuts or workbook features, and it is not a product execution test. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. Treat “use counta in excel” as a small building block rather than a chore. Once the inputs sit in their own cells and the formula reads from them, the same setup answers a dozen related questions with a tweak, and Excel keeps every dependent figure current as the data changes. The tool above is there so you can rehearse and verify before committing anything to a real workbook; the steps and worked example are there so the logic sticks. Get it right once and it stops costing you time — it starts saving it, every time the question comes back around.

Common mistakes

  • Counting a column of formulas that return "" and reading the result as the number of filled rows.
  • Using COUNTA where only numbers should count, which silently includes text placeholders.
  • Assuming it ignores errors — an #N/A cell is non-empty and counts.

Frequently asked questions

Does COUNTA count formulas that return an empty string?

Yes. The cell is not empty, it contains a formula, so it counts. That is the most common surprise with this function.

How do I count only visible entries?

Use =SUMPRODUCT(--(LEN(range)>0)), which tests the actual text length rather than cell occupancy.

What is the difference between COUNTA and COUNT?

COUNTA counts everything non-empty; COUNT counts only numeric values.

Other ways people ask this

This is also commonly searched as “counta formula in excel” and “excel formula counta”. They describe the identical operation, so you are in the right place no matter how you phrased it.

Why do people search for this in so many different ways?

Because the same task has many names. “counta formula in excel”, “excel formula counta” all point at the one operation explained on this page, which is why they all lead here.