COUNTIF Function in Excel: A Must-Know Function

Last Updated on 26/11/2024
Reading time: 2 minutes

The COUNTIF function is one of the top 10 Excel functions every user should know. It helps count cells that meet a specific condition in your workbook. This makes it a powerful tool for analyzing data.

Don't use Filter to Count Rows ⛔

Using the Filter tool to count rows can be time-consuming, especially with large datasets. Because

  1. You must filter your dataset on a specific column
  2. Select your value in the filter dropdown list
  3. Visualize in the status bar the number of records
  4. And remember this number in your head because .... once you select a new item, this value will disappear.
Filter and count the rows in the status bar

The solution: The COUNTIF function 😃👍

The COUNTIF function does the same job

  • The function counts all the rows on a specific criterion.
  • A criterion is the value you select in the dropdown list in the filter
  • But with the COUNTIF formula, you have the result immediately
  • This saves time and reduces errors 🏆

How to use the COUNTIF function?

The function is very simple to use

  1. Range: The cells to check.
  2. Criteria: The condition to match.

=COUNTIF(range, criteria)

Now, if we want to count how many rows correspond to "Jeans" we have to write the following formula

How many times we have sold Jeans with the COUNTIF function

But we can also replace the name "Jeans" by the value in cell F4.

COUNTIF function with a cell reference as criterion

How to Count with Multiple Criteria?

You cannot use COUNTIF for multiple criteria. Instead, use the COUNTIFS function.

  • It counts rows that match more than one condition.
  • You can use up to 256 criteria.
  • For most tasks, 3-5 criteria are usually enough.

Related Articles

Leave a Reply

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

COUNTIF Function in Excel: A Must-Know Function

Reading time: 2 minutes
Last Updated on 26/11/2024

The COUNTIF function is one of the top 10 Excel functions every user should know. It helps count cells that meet a specific condition in your workbook. This makes it a powerful tool for analyzing data.

Don't use Filter to Count Rows ⛔

Using the Filter tool to count rows can be time-consuming, especially with large datasets. Because

  1. You must filter your dataset on a specific column
  2. Select your value in the filter dropdown list
  3. Visualize in the status bar the number of records
  4. And remember this number in your head because .... once you select a new item, this value will disappear.
Filter and count the rows in the status bar

The solution: The COUNTIF function 😃👍

The COUNTIF function does the same job

  • The function counts all the rows on a specific criterion.
  • A criterion is the value you select in the dropdown list in the filter
  • But with the COUNTIF formula, you have the result immediately
  • This saves time and reduces errors 🏆

How to use the COUNTIF function?

The function is very simple to use

  1. Range: The cells to check.
  2. Criteria: The condition to match.

=COUNTIF(range, criteria)

Now, if we want to count how many rows correspond to "Jeans" we have to write the following formula

How many times we have sold Jeans with the COUNTIF function

But we can also replace the name "Jeans" by the value in cell F4.

COUNTIF function with a cell reference as criterion

How to Count with Multiple Criteria?

You cannot use COUNTIF for multiple criteria. Instead, use the COUNTIFS function.

  • It counts rows that match more than one condition.
  • You can use up to 256 criteria.
  • For most tasks, 3-5 criteria are usually enough.

Related Articles

Leave a Reply

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