COUNTA function

COUNTA() function

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Count how many values are in a list of arguments

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


COUNTA defines up to 255 'values to count' including individual values (1,"text",3), cell references (A1,A2,A3), ranges (A1:A3) or a mix of all three.

All text and numbers including negative values, percentages, dates, fractions, and times are counted by the COUNTA function. Empty cells are ignored.

To just count numerical values, use the COUNT function. To count numbers that meet certain criteria, use the COUNTIF (single criterion) or the COUNTIFS (multiple criteria) function. To count empty cells, use the COUNTBLANK function.


COUNTA text and numbers.

In the examples below, the COUNTA function is used to count values in contiguous and non-contiguous ranges.

Use the COUNTA function to count how many values are in a list of arguments.

Use the COUNTA function to count how many values are in a list of arguments.

Syntax

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

The COUNTA function consists of up to 255 arguments:

  1. value1. Required. The first value to count.
  2. value2. Optional. The second value to count.
  3. .... Optional. Additional values (up to 255) to count.

Try it now!

  • Enter your formulas into the grey cells.

Scope

COUNTA can be applied to cell references, ranges, named ranges, tables, constants and arrays.

  • Cell reference:
  =COUNTA(C3,C5,C7)
  • Range:
  =COUNTA(C3:C7)
  • Named Range:
  =COUNTA(myNamedRange)
  • Table:
  =COUNTA(Table1[ColumnName])
  • Constant:
  =COUNTA(number1,text2,number3,...)

Caveats

The COUNTA function:

  • can handle up to 255 individual arguments.
  • will ignore empty cells (but not cells that contain empty strings "") and will return the count of any text, numeric or TRUE/FALSE values.
  • will automatically update if rows or columns within the range referenced in the formula are deleted. This prevents a #REF! error.
  • will update to include added rows or columns (assuming they are within the range referenced in the formula).

Related Functions

  • COUNT: to count numbers.
  • COUNTBLANK: to count empty cells.
  • COUNTIF: to count values in a range that meet a single criteria.
  • COUNTIFS: to count values in a range that meet multiple criteria.

Functions Category

 

Register (for free!) or Login to access bonus materials

About xlsnippets

Learn how to master functions, charts, pivot tables and more using Excel for Microsoft Office 365. Simple instructions and embedded spreadsheets help you practise the basics.

Latest Updates

26 March 2022
26 March 2022
26 March 2022
25 March 2022
22 March 2022

Coming soon

xlsnippets.com is currently in beta version. More functions and bonus content for registered users will be added weekly. Detailed training courses with additional downloadable resources are also on the horizon!