What does it do?
Counts the number of cells that matches your specified condition
What it means:
=COUNTIF(range of cells to check, condition to check against)
Do you have a scenario where you want to count the number of cells that match a specific condition?
I’m sure you do! There is a simple way to count this with Excel’s COUNTIF formula!
The COUNTIF formula is very flexible indeed, so let us try to count the following from our Excel worksheet:
- Number of cells greater than 2
- Number of cells that have a Yellow value
- Number of cells that start with the letter J
I explain how you can do this below:
STEP 1: We need to enter the COUNTIF function in a blank cell:
STEP 2: The COUNTIF arguments:
Table of Contents
What is the range of values that you want to check against your condition?
What is the condition that you want to check against?
For our 1st example, we want to count the number of values greater than 2.
You now have your count of numbers greater than 2!
STEP 3: Now let us try for counting the number of Yellow values:
You now have your count of values that have the Yellow text!
STEP 4: Now let us try for counting the number of names starting with the Letter J:
Let us use the wildcard expression J*
* signifies a wildcard character i.e. Return any value that begins with a J
You now have your count of values that have a starting letter of J!
CountIf Formula in Excel
Bryan is a best-selling book author of the 101 Excel Series paperback books.