Count Function in Excel | How to Count Cells
Count function in excel is used to count cells. The cells can contain numbers, text or be just blank.
In this article we’ll learn how to count cells in excel and see the difference between COUNTA and COUNT function.
Table of Contents
Count Function Excel
There are 2 syntax:
=COUNT(Value1, Value2, Value3….)
You can count individual values or you can count cells in an excel range directly.
- There are 4 numbers in column A which we want to count.
- Select the cell where you want the count value and type =COUNT(A2:A5) Press enter.
- The result is 4 i.e there are 4 cells in the selected range. That’s how counting function in excel works.
Remember logical values, text and errors are not counted by the count formula in excel.
COUNTA Function in Excel
COUNTA formula can be used to count cells in excel with any type of data be it errors, formulas or logical values.
- The data range has a mix of data values. Let’s count rows in excel.
- Select the cell where you want the count value and type =COUNTA(A2:A5)
- You can see that COUNTA is also counting errors and logical values.
COUNTBLANK Function in Excel
If you only want to count cells in Excel that are blank then you can use the COUNTBLANK formula.
- The data range has 3 blank cells which we want to count.
- Select the cell where you want the count value and type =COUNTBLANK(A2:A7) and hit enter.
- The function returns 3. This is how you can count empty cells in excel.
Other COUNT Functions
There are some more count functions which are used to count rows in excel which meet a certain criteria.
For example: count cells in excel where the text is “Apples”. Here are some more articles which can benefit you:
- COUNTIF function in excel.
- Count characters in excel using LEN formula.
This was all about the count function in excel.
We hope you now know how to count number of cells in excel containing blanks, numbers, text, error, logical values etc.
In case you have any doubts or suggestions, do leave a comment below.
Happy learning 🙂
Advanced Excel Course
Learn Vlookup, Pivot tables, What IF, Macro Automation, Power Query and much more.
- 10+Hrs of Learning Content
- 50+ Practical Exercises
- Doubt Resolution