COUNTA Function in Excel: Count Non-Empty Cells

COUNTA Function in Excel: Count Non-Empty Cells featured illustration

πŸ“Ž This article includes 1 downloadable practice file ↓

⏱ 3 min readUpdated 3 November 2026

Excel Core FunctionsLevel: Foundational β†’ IntermediateCompatibility: All Excel Versions

In this article
  1. Syntax & Parameter Breakdown
  2. Where You Will Use It
  3. Practical Worked Examples
  4. Mistakes People Make & How to Avoid Them
  5. Frequently Asked Questions
  6. Why does COUNTA return 1 on a cell that looks blank?
  7. How can you count only cells containing visible text?
  8. Can COUNTA be used in dynamic range definitions?
  9. COUNTA in practice
  10. Where you will use it
  11. Worked example
  12. Mistakes people make
  13. Continue learning

The COUNTA function in Excel is an essential spreadsheet tool designed to Count the number of non-empty cells in a range, tallying numbers, text strings, dates, boolean values, and error codes.

Advertisement

Syntax & Parameter Breakdown

=COUNTA(value1, [value2], ...)
Argument Requirement & Description
value1 Required. The first cell reference or range to check for non-empty contents.
value2, ... Optional. Up to 255 additional ranges or items to evaluate.

Where You Will Use It

Indispensable for dynamically calculating the last populated row in a table, verifying roster attendance, and counting customer registrations.

Practical Worked Examples

Here are common real-world formula scenarios utilizing COUNTA:

Formula Expected Behavior & Purpose
=COUNTA(A2:A1000) Counts total populated rows in column A, regardless of whether they contain names, dates, or IDs.
=COUNTA(B2:F2) Counts how many checklist items were filled out in row 2.
=IF(COUNTA(A2:D2) < 4, "Incomplete", "Complete") Validates that all 4 required fields in a record are filled.

Mistakes People Make & How to Avoid Them

COUNTA counts cells that contain empty strings (“”) returned by formulas or spacebar spaces (‘ ‘), even though the cell looks blank to the naked eye.

Frequently Asked Questions

Why does COUNTA return 1 on a cell that looks blank?

If the cell contains an invisible space or an empty string formula like =IF(A1>0, A1, “”), COUNTA considers it non-empty.

How can you count only cells containing visible text?

Use =COUNTIF(A2:A100, “?*”) to count only cells that contain at least one visible text character.

Can COUNTA be used in dynamic range definitions?

Yes, COUNTA is frequently used inside OFFSET to create expanding ranges for drop-down lists.

πŸ“š Master spreadsheet formulas with our Free Excel Course or explore related functions in the Formula Lab.

⚑ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

COUNTA in practice

Where you will use it

  • Count filled rows in a list
  • How many people responded (any answer)
  • Number of non-empty cells in a form

Worked example

EntryFormulaResult
120=COUNTA($A$2:A2)1
Absent=COUNTA($A$2:A3)2
(blank)=COUNTA($A$2:A4)2
95=COUNTA($A$2:A5)3

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
Cells with a formula returning "" are countedUse COUNTIF(range,"?*") or SUMPRODUCT(--(LEN(range)>0))
Counting a whole column with a headerSubtract 1, or start the range below the header

πŸ“Ž Practice files for this article

  • πŸ“—
    Practice workbook: Statistics basics22 tasks on realistic sales data β€” type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX Β· 34 KB

Free to use for learning. Files with macros (.bas) are plain text β€” import them with Alt+F11 β†’ File β†’ Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free Β· AI can be wrong