COUNT function

COUNT() function

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Count how many numbers are in a list of arguments

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


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

All numbers including negative values, percentages, dates, fractions, and times are counted. Non-numeric values (e.g. text and empty cells) are ignored by the COUNT function.

To count text, logical or error values, use the COUNTA function. To count numbers that meet certain criteria, use the COUNTIF (single criterion) or the COUNTIFS (multiple criteria) function.


COUNT numbers.

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

Use the COUNT function to count how many numbers are in a list of arguments.

Use the COUNT function to count how many numbers are in a list of arguments.

Syntax

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

The COUNT 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

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

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

Caveats

The COUNT function:

  • can handle up to 255 individual arguments.
  • will ignore text values, empty cells and TRUE and FALSE values and will return the count of just the numeric 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

  • COUNTA: to count numbers and text.
  • 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!