Counting is a very fundamental operation for any spreadsheet related work. While there are a family of functions to help you in this regard, COUNT Function is certainly the most used in this arena.
While COUNT is a very straightforward and easy one to understand, there are still hidden nuances one should be aware of. In this article we’ll deep-dive into all the aspects of COUNT Function.
Helps in counting number of distinct numerical values in a specified dataset.
Syntax and Parameter Definition
= COUNT(value1, [value2, value3, .....])
- value1: Can be a constant value(3,2,4 etc), cell reference(A2,B3 etc) or range(B1:B10) which will be considered for counting.
Rest of the arguments have the same definition as of value1, however, they are optional to supply
It returns count of number of numeric value in the provided values arguments. Below data elements will be counted:
- Numbers(Integers, Decimals & % included)
Data types like text, boolean, error will be ignored
Three main pointers to highlight:
- If the same numbers occurs twice then it will be counted twice
- Dates are inherent stored as numbers in Google Sheet, hence they’ll be counted as well
- Cells with blank values will be ignored
Note: To count cells containing any value(Number, Text, Date etc) use COUNTA instead of COUNT.
COUNT Function – Basic Example
In the below example, we have selected different type of data elements and applied Count Function over it.
As, per the definition only 5 highlighted cells were eligible to be counted and that’s what the results of count function is.
COUNT Function – Different Combination of Inputs types
From what was covered earlier, we know that we can supply inputs to COUNT as constant value, cell references or range.
The output in the below example is easy to understand, however, what is worth noting is different combinations of value inputs.
COUNT Function – Case of Repeated Numbers
COUNT Function doesn’t care about numbers getting repeated, rather it tells us count of all instances where numbers were found.
Below is the same example we used earlier. Notice we have replaced B4 from -2 to 10 making it similar to B3. The output(5) remains unchanged as expected.
COUNT Function – Case of blank/empty cells
COUNT Ignores any blank/empty cells coming it’s way. This is very well demonstrated by the below example.
Visual Demo of COUNT Function
Before we end here is a sample visual demonstration of COUNT Function in action.
That’s it on this topic. Keep browsing SheetsInfo for more such useful information 🙂