0% found this document useful (0 votes)
23 views1 page

How To Use The Excel COUNTIF Function (In Easy Steps) 2

Uploaded by

Haylie Hoang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views1 page

How To Use The Excel COUNTIF Function (In Easy Steps) 2

Uploaded by

Haylie Hoang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Count Booleans

Use the COUNTIF function in Excel to count Boolean values (TRUE or FALSE).

1. The COUNTIF function below counts the number of cells that contain the Boolean TRUE.

2. The COUNTIF function below counts the number of cells that contain the Boolean FALSE.

Count Errors
Use the COUNTIF function in Excel to count specific errors.

1. The COUNTIF function below counts the number of cells that contain the #NAME? error.

2. The array formula below counts the total number of errors in a range of cells.

Note: finish an array formula by pressing CTRL + SHIFT + ENTER. Excel adds the curly braces
{}. In Excel 365 or Excel 2021, finish by simply pressing Enter. You won't see curly braces.
Visit our page about Counting Errors for detailed instructions on how to create this array
formula.

And Criteria
Counting with And criteria in Excel is easy. The COUNTIFS function (with the letter S at the
end) in Excel counts cells based on two or more criteria.

1. For example, to count the number of rows that contain Google and Stanford, simply use the
COUNTIFS function.

Or Criteria
Counting with Or criteria in Excel can be tricky.

1. The COUNTIF functions below count the number of cells that contain Google or Facebook
(one column). No rocket science so far.

2. However, if you want to count the number of rows that contain Google or Stanford (two
columns), you cannot simply use the COUNTIF function twice (see the picture below).

Note: rows that contain Google and Stanford are counted twice, but they should only be
counted once. 4 is the answer we are looking for.

3. The array formula below does the trick.

Note: finish an array formula by pressing CTRL + SHIFT + ENTER. Excel adds the curly braces
{}. In Excel 365 or Excel 2021, finish by simply pressing Enter. You won't see curly braces.
Visit our page about Counting with Or Criteria for instructions on how to create this array
formula.

More about Countif


The COUNTIF function is a great function. Let's take a look at a few more cool examples.

1. The COUNTIF function below uses a named range. The named range Ages refers to the
range A1:A6.

2. The COUNTIF function below counts the number of cells that are less than the average of
the ages (32.2).

3. To count cells between two numbers, use the COUNTIFS function (with the letter S at the
end).

4. Use the COUNTIF function to count how many times each value occurs in the named range
Ages.

Note: cell B2 contains the formula =COUNTIF(Ages,A2), cell B3 =COUNTIF(Ages,A3), etc.

5. Add the IF function to find the duplicates.

Tip: use COUNTIF and conditional formatting to find and highlight duplicates in Excel.

Count Magic
The COUNTIF function can't count how many times a specific word occurs in a cell or range
of cells. All we need is a little magic!

1. The formula below counts how many times the word "dog" occurs in cell A1.

2. The formula below counts how many times the word "dog" occurs in the range A1:A2.

Note: visit our page about counting words to learn more about these formulas.

2/10 Completed! Learn more about count & sum functions >
Go to Next Chapter: Logical Functions

Countif • © 2010-2023
Popular Excel Topics: Pivot Tables • Vlookup • Formulas • Charts • Conditional Formatting

You might also like