How to Apply Countif Formula in Excel: A Comprehensive Guide

How to Apply COUNTIF Formula in Excel

The COUNTIF formula in Excel is a powerful tool that helps you count cells with specific criteria in a range. To use it, you simply type the formula =COUNTIF(range, criteria) into a cell. This formula searches through a specified range of cells and counts how many meet your criteria, like finding the number of cells containing a certain number or text. It’s a game-changer for quickly analyzing data.

Step-by-Step Tutorial on How to Apply COUNTIF Formula in Excel

Let’s dive into how to apply the COUNTIF formula in Excel. These steps will guide you through the process, ensuring you can count specific data with ease.

Step 1: Open Your Excel Spreadsheet

First, open your Excel spreadsheet where you want to use the COUNTIF formula.

Opening your spreadsheet is simple. Just double-click the Excel icon, find your file, and click to open it. Make sure your data is organized in a way that makes it easy to identify the range and criteria you want to count.

Step 2: Select the Cell for the Result

Next, click on the cell where you want the count to appear.

Choosing the right cell for your result is crucial. This cell should be empty and ideally placed where you can easily see it. It’s often best to place it near the data you are analyzing for quick reference.

Step 3: Enter the COUNTIF Formula

Type =COUNTIF( into the selected cell.

When typing the formula, make sure you start with an equals sign. This tells Excel that you are entering a formula. The COUNTIF function begins with COUNTIF, followed by an open parenthesis.

Step 4: Specify the Range

Add the range of cells you want to analyze.

Enter the range by clicking and dragging over the cells or typing the range manually, for example, A1:A10. This range is where Excel will look for the criteria you set.

Step 5: Enter the Criteria

After the range, type a comma and then specify your criteria within quotation marks.

Your criteria can be a number, text, or expression, like “>5” or “Apples”. For instance, if you want to count cells with the word "Apple", type “Apple” after the comma.

Step 6: Close the Formula

Finish the formula with a closing parenthesis and press Enter.

Ensure you close the formula correctly. The complete formula should look like this: =COUNTIF(A1:A10, “Apple”). This final step executes the formula and displays the count in the selected cell.

After you complete these steps, Excel will display the count of cells that match your criteria. This count updates automatically if your data changes, making it easy to keep track of information.

Tips for Using COUNTIF Formula in Excel

  • Use Wildcards: Use the asterisk (*) as a wildcard to match any string of characters, and the question mark (?) to match any single character.
  • Combine with Other Functions: Combine COUNTIF with other formulas like SUM or AVERAGE for more complex analyses.
  • Case Sensitivity: Remember, COUNTIF is not case-sensitive, so “Apple” and “apple” are considered the same.
  • Numeric Criteria: When using numeric criteria, you can use operators like >, =, <=.
  • Named Ranges: Use named ranges to make your formula clearer and your worksheet easier to manage.

Frequently Asked Questions about the COUNTIF Formula in Excel

What is the COUNTIF formula used for in Excel?

The COUNTIF formula counts the number of cells within a range that meet the specified condition or criteria.

Can I use multiple criteria with COUNTIF?

No, for multiple criteria, use the COUNTIFS function which allows for multiple conditions.

Why is my COUNTIF formula not working?

Common issues include incorrect range or criteria syntax, misspellings, or logical errors in the criteria.

How do I count cells with partial text?

Use wildcards like * (asterisk) for any sequence of characters, or ? (question mark) for any single character.

Is COUNTIF case-sensitive?

No, the COUNTIF function is not case-sensitive. It treats “Apple” and “apple” as the same.


  1. Open your Excel spreadsheet.
  2. Select the cell for the result.
  3. Enter the COUNTIF formula.
  4. Specify the range.
  5. Enter the criteria.
  6. Close the formula and press Enter.


Mastering the COUNTIF formula in Excel can elevate your data analysis skills. Whether you’re counting sales, tracking inventory, or analyzing survey results, COUNTIF offers a straightforward way to sift through your data. And it doesn’t stop there; once you’re comfortable with COUNTIF, you can explore its siblings like COUNTIFS for more complex criteria.

Practice makes perfect, so don’t hesitate to experiment with different ranges and criteria. Excel might seem like a maze at first, but with tools like COUNTIF, you’ll be navigating it like a pro in no time. For further reading, dive into Excel’s other powerful functions to continue your journey toward becoming an Excel ninja. Happy counting!

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy