0% found this document useful (0 votes)
67 views

Examples of Count If

This document provides examples of using the COUNTIF function in Excel. It includes a table with sample data on fruits and quantities to copy and paste into a worksheet. It then lists 8 COUNTIF formulas with descriptions to count cells based on various criteria, such as matching text, numbers within a range, wildcards, and more. The results are displayed for each example formula.

Uploaded by

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

Examples of Count If

This document provides examples of using the COUNTIF function in Excel. It includes a table with sample data on fruits and quantities to copy and paste into a worksheet. It then lists 8 COUNTIF formulas with descriptions to count cells based on various criteria, such as matching text, numbers within a range, wildcards, and more. The results are displayed for each example formula.

Uploaded by

Renel Rico
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Examples

To use these examples in Excel, copy the data in the table below, and paste it in cell
A1 of a new worksheet.
fruits quantity
apples 32
oranges 54
peaches 75
apples 86
Count: 0 Count: 4
Formula Description
1=COUNTIF(A2:A5,"apples") Counts the number of cells with apples in cells A2 through
A5. The result is 2.
2=COUNTIF(A2:A5,A4) Counts the number of cells with peaches (the value in A4)
in cells A2 through A5. The result is 1.
3=COUNTIF(A2:A5,A2)+COUNTIF(A2:A5,A3) Counts the number of apples (the value in A2), and
oranges (the value in A3) in cells A2 through A5. The result
is 3. This formula uses COUNTIF twice to specify multiple
criteria, one criteria per expression. You could also use
the COUNTIFSfunction.
4=COUNTIF(B2:B5,">55") Counts the number of cells with a value greater than 55 in
cells B2 through B5. The result is 2.
fruits quantity

5=COUNTIF(B2:B5,"<>"&B4) Counts the number of cells with a value not equal to 75 in


cells B2 through B5. The ampersand (&) merges the
comparison operator for not equal to (<>) and the value in
B4 to read =COUNTIF(B2:B5,"<>75"). The result is 3.
6=COUNTIF(B2:B5,">=32")-COUNTIF(B2:B5,">85") Counts the number of cells with a value greater than (>) or
equal to (=) 32 and less than (<) or equal to (=) 85 in cells
B2 through B5. The result is 3.
7=COUNTIF(A2:A5,"*") Counts the number of cells containing any text in cells A2
through A5. The asterisk (*) is used as the wildcard
character to match any character. The result is 4.
8=COUNTIF(A2:A5,"?????es") Counts the number of cells that have exactly 7 characters,
and end with the letters "es" in cells A2 through A5. The
question mark (?) is used as the wildcard character to
match individual characters. The result is 2.

You might also like