COUNT() – Counts cells containing numbers in a range
The COUNT() function counts the number of cells within a specified range that contain numeric values.
Syntax
COUNT(range)
- range: A continuous range of cells where you want to count numeric entries (e.g., T1A1:T1A10).
Basic example
COUNT(T1A1:T1A10)
This formula counts how many cells in the range T1A1 through T1A10 contain numbers.
Example outputs:
- If cells T1A1:T1A10 contain [1, 2, "text", 4, 5, 6, 7, 8, 9, 10, empty_cell], the formula returns 9 (the text "text" and the empty cell are ignored).
- If cells T1A1:T1A5 contain ["apple", "orange", TRUE, 100, "123"], only 100 is counted.
Key features
- Numeric focus: Only cells containing actual numbers are included in the count.
- Ignores text: Text values within the range are not counted.
- Ignores empty cells: Blank cells within the range are not counted.
Practical uses
- Determining the number of numeric entries in a dataset.
- Counting how many items have a price, quantity, or other numerical attribute listed.
Common mistakes
- Incorrect range specification: Ensure the range is correctly defined.
- Expecting to count text or all non-empty cells: COUNT() is specifically for numeric values. For counting all non-empty cells, use COUNTA() if available.
- Numbers formatted as text: If numbers are stored as text and not automatically converted by MathGrid for COUNT(), they will not be included in the count.
MathGrid ©
MathGrid ©