Back to functions
Statistical2026-03-187 related articles

COUNTA Function in Excel

Count how many cells are not empty.

Syntax

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

Arguments

value1

Required

The first argument representing the values that you want to count.

value2

Optional

Additional arguments representing the values that you want to count, up to a maximum of 255 arguments.

What it returns

Returns the number of nonblank cells in the supplied arguments.

What COUNTA does

COUNTA counts every nonblank cell, including cells that contain text, numbers, errors, or formulas that return an empty-looking value. Use it when you need a population count rather than a numeric count.

Practical examples

Count all filled cells in a column

=COUNTA(A2:A20)

This gives the number of rows that contain any value in the selected range.

Count nonblank cells across separate ranges

=COUNTA(B2:B10,D2:D10)

Use this when the populated cells you care about are split across different parts of a worksheet.

Common mistakes and notes

COUNTA counts text as well as numbers

If you only want numeric entries, use COUNT instead. COUNTA includes text labels, dates, and other nonblank content.

Cells with formulas may still count

If a formula returns an empty string like "", COUNTA can still treat that cell as nonblank depending on how the sheet is structured. Test this carefully in dashboards.

COUNTA is not the opposite of COUNTBLANK

Mixed formulas, hidden values, and helper cells can make COUNTA + COUNTBLANK behave differently than expected on a messy worksheet.

Related functions

Related articles

Deep dives, troubleshooting guides, and practical examples that use COUNTA.

Intermediate
2022-01-31

How to Create a Drop Down List in Excel with Data Validation

Are you wondering how to create a drop down list in excel? Don't worry. Our step-by-step guide tells you everything that you need to know....

6 min read
Read Article
BeginnerFeatures
2018-05-23

5 New and Creative Ways To Utilize Excel

Excel is a program that is beneficial to anyone who wants to organize the utility bills or for professionals who need to stay organized at the office. To most Excel users, it can seem like a pretty cut and dry program. W...

8 min read
Read Article
FormulasIntermediate
2011-05-25

A Dynamic Dependent Drop Down List in Excel

Learn how to create dynamic dependent drop-down lists in Excel....

#excel-legacy#excel-for-mac#names
6 min read
Read Article
FeaturesFormulasIntermediate
2010-10-19

A Sparkline Example in Excel 2010

Create a dynamic range sparkline graphic to show the last seven data points. Sparklines are new in Excel 2010 and don't work with earlier versions....

3 min read
Read Article
FormulasIntermediate
2010-10-16

Put an OFFSET Formula Inside a Named Range

Create a Named Range using a formula with the OFFSET Function to capture the last 7 days of a range....

1 min read
Read Article
FormulasIntermediate
2010-10-14

The OFFSET Function - Last 7 Data Points

Use the OFFSET Function to return the last 7 rows of a range....

3 min read
Read Article
FormulasIntermediate
2010-10-09

Become the OFFSET Function and Tell a Short Story

I become the OFFSET function to tell a simple story of how I give you a value for the last cell in a range by using an example....

3 min read
Read Article

Official documentation