COUNT is a statistics function that counts the numeric values within the specified range. A common use case for this function is counting the cells that have numeric values. In this guide, we’re going to show you how to use the COUNT function and also go over some tips and error handling methods.

Supported versions

  • All Excel versions

Syntax

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

Arguments

value1

An item, cell reference, or range in which the number of cells is to be counted.

value2

Optional. Additional items, cell references, or ranges. You can add additional arguments up to 255.

Examples

Basic use case

=COUNT(HP,Attack)
formula returns the count of the numeric values in the references named HP and Attack.

count function

Strings, errors, logical values, and dates

=COUNT(MixedTable)
formula evaluates the COUNT formula in range that includes strings, errors, logical values and dates in addition to numbers. The formula returns 4, 3 for numbers and 1 for dates. Excel keeps the date values as serial numbers, so they are counted by the function. All other values are skipped, even 00010 which is entered after a single quote (').

Tip: Use the COUNTA function to include strings, errors, and logical values in the count.

count function

Download Workbook

Tips

  • The COUNT formula does not count empty cells or cells that contain logical values, text, or error values.
  • If you want to count logical values, text, or error values, use the COUNTA function.
  • If you want to count only numbers that meet a certain criteria, use the COUNTIF function or the COUNTIFS function.