Formualizer Docs

COUNTA

Counts non-empty cells and scalar arguments.

COUNTA counts any value except true empty cells.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

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

Arguments

ArgumentTypeRequiredDefault
value1anyRequired—
value2anyOptional—

Accepts a variable number of arguments. Minimum: 1.

Remarks

  • Numbers, text, booleans, and errors all count.
  • Empty string values ("") are counted as non-empty.
  • Truly empty cells are the only values excluded.

Examples

Count a number and text while leaving the blank cell out.

Formula =COUNTA(A1:A3)

Input cells
A
13
2"five"
3(blank)

Expected result 2

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Include an error cell, which is still a populated cell.

Formula =COUNTA(A1:A4)

Input cells
A
13
2"five"
3(blank)
4=1/0

Expected result 3

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A reference to a genuinely empty cell contributes zero.

Formula =COUNTA(A3)

Input cells
A
3(blank)

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Count mixed populated values

Formula =COUNTA(1, "x", TRUE, "")

Expected result 4

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Range count excludes only true blanks

Formula =COUNTA(A1:A3)

Input cells
A
110
2""

Expected result 2

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Errors are counted

Formula =COUNTA(1/0, 5)

Expected result 2

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

Does COUNTA count empty-string results like ""?

Yes. Empty text is counted as non-empty by COUNTA.

Are error values counted?

Yes. Errors are considered populated values and increase the count.

Implementation

Engine source

On this page