Skip to content

How to Use the COUNTIF Function

When it comes to counting, a spreadsheet is one of the best tools available. When it comes to logic, a spreadsheet comes in handy once again.

How about when you put counting and logic together? Once again, a spreadsheet has you covered. Enter the COUNTIF function!

The COUNTIF Function

The COUNTIF function allows you to count the cells in a spreadsheet that meet a given condition.

For example, if you have a list of foods and would like to count how many times the word “Pizza” appears, you would use the COUNTIF function.

Another example would be to count how many numbers are greater than, less than, or equal to a given value.

For instance, if you have a list of prices for your food items, you could use the COUNTIF function to see how many prices are greater than ten dollars.

How to Use the COUNTIF Function

To use the COUNTIF Function, you need two arguments. The first argument is the range of cells you want the function to analyze. The second argument is the criteria you are checking.

=COUNTIF(range, criteria)

In the first example listed earlier, you want to see how many times the word “Pizza” appears in the list of foods.

 

In this case, the range (first argument) would be the cells containing the list of foods. The criteria (second argument) would be the word (string value) of “Pizza.”

 

The final formula would be the following.

=COUNTIF(A2:A9,"Pizza")

This formula will count how many times the word pizza appears in the list of foods. In this case, the word pizza appears three times.

 

The second example involves looking at how many prices are above a value of ten.

The range includes all cells containing the prices, and the criteria is “>10” which means greater than ten.

 

The final formula would then be:

=COUNTIF(B2:B9,">10")

The COUNTIF function counts how many prices are greater than ten and returns a value of four.

 

And that about sums up how to use the COUNTIF function.

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back To Top