COUNT Function
The COUNT function is a premade function in Google Sheets, which counts cells with numbers.
It is typed =COUNT
and gets a list of cells:
=COUNT(value1, [value2, ...])
You can select cells one by one, but also ranges, or even multiple ranges.
Note: The COUNT function only counts cells with numbers, not cells with letters. The COUNTA function is used if the cells have letters.
Count Function Example
Apply the =COUNT
function to range D2:D21
. Counting the cells of Pokemon Total stats, which is numbers only:
Copy Values
COUNT function, step by step:
- Select the cell
D22
- Type
=COUNT
- Click the COUNT command
- Specify range
D2:D21
- Hit enter
That's it! The =COUNT
function successfully counted 20 cells with numbers.
A Non-Working Example
Now, let us try an example that will not work.
Apply the =COUNT
function to the range A2:A21
, which only has cells with letters.
It returns the value 0
, no cells with numbers found. Range A2:A21
only had cells with letters.
×
Contact Sales
If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com
Report Error
If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com
Top Tutorials
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
W3.CSS Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial
Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
W3.CSS Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
Angular Reference
jQuery Reference
W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.
Copyright 1999-2024 by Refsnes Data. All Rights Reserved.W3Schools is Powered by W3.CSS.