You can count exactly what you want in Excel. There’s a function in excel that will let you count almost anything you need. From counting the blank cells, the cells that contain the keyword you want, cells with numbers, or cells non-blank cells.
These are basic count functions to speed up your work. They’re not hard to remember and the syntax is so simple. The basic syntax is =COUNT (
and the range of cells you want to count. Depending on what criteria you need, you can easily count them.
See also how to calculate between dates in Excel.
How to count cells in Excel
Count all cells
This is the most basic, you don’t have to use any syntax. Just select all cells and see at the bottom of the Excel, it will display how many cells you selected.
Count cells with text: Use COUNTIF function
The syntax formula is COUNTIF(value1, criteria)
where value1
is required and value2
is optional.
- Select any cell you want the total number to appear.
- Type
=COUNTIF (
- Select the cells range you want to count, for example from A1 through E4.
- Type
,"*")
and hit Enter. - Your syntax will look like this:
=COUNTIF(A1:E4,"*")
Count cells with numbers: Use COUNT function
The syntax formula is COUNT(value1, value2,…)
where value1
is required and value2
is optional.
- Select any cell you want the total number to appear.
- Type
=COUNT (
- Select the cells range you want to count, for example from A1 through E4.
- Type
)
and hit Enter. - Your syntax will look like this:
=COUNT(A1:E4)
Count blank cells: Use COUNTBLANK funtion
The syntax for the formula is COUNTBLANK(value1)
where value1
contains the cell references and is required.
- Select any cells you want the total number to appear.
- Type
=COUNTBLANK (
- Select the cells range you want to count, for example from A1 to E4.
- Type
)
and hit Enter. - Your syntax will look like this:
=COUNTBLANK(A1:E4)
Count non-blank cells: Use COUNTA function
The syntax is COUNTA(value1, value2,…)
where value1
is required and value2
is optional.
- Select any cells you want the total number to appear.
- Type
=COUNTA (
- Select the cells range you want to count, for example from A1 through E4.
- Type
)
and hit Enter. - Your syntax will look like this:
=COUNTA(A1:E4)
Count cells with specific criteria: Use COUNTIF function
The syntax for the formula is COUNTIF(value1, criteria)
where both value1
and criteria
are required.
- Select any cells you want the total number to appear.
- Type
=COUNTIF (
- Select the cells range you want to count, for example from A1 through E4.
- Type
,
and select the cell that contain the criteria you wanted to count, for exampletech
.- or you can simply type the keyword
tech
- or you can simply type the keyword
- Type
)
and hit Enter. - Your syntax will look like this:
=COUNTIF(A1:E4,A2)
or
=COUNTIF(A1:E4,tech)
That’s all the basic count function in Excel. It’s so simple and you can easily remember them after you do it just for a few times.