Back to Blog

How to Use COUNTIF in Excel

D
David DeSouza
Dec 1, 2025
An illustration depicting two square-shaped spreadsheets or checklists, each bordered in purple and gray outlines, against a light cream-colored oval background. The spreadsheet on the left displays two columns and four rows of cells. The first column from the top shows a light pink checkmark in the first cell, a red background with a white checkmark in the second and third cells, and a red background with a white 'X' in the fourth cell. The second column has an empty cell, then a red background cell, and two empty cells. A green circle with a white checkmark is positioned above the top right corner of this left spreadsheet. The spreadsheet on the right also has two columns and four rows of cells. The first column from the top displays two cells with red backgrounds and white checkmarks, followed by two empty cells. The second column shows an empty cell, a red background cell, and two more empty cells. Above the top right corner of this right spreadsheet is a red circle with a

The Problem

You have a sales log and you want to know how many sales were made by "John" or how many orders were over $500.

The Easy Way: Use SheetXAI

If you don't want to mess with formulas, the fastest way to do this is simply by asking.

With SheetXAI, you can open the sidebar and type:

Count how many sales were over $500.

SheetXAI will instantly write the formula or script for you and fill the cells. It handles the syntax so you can focus on the result.

The Manual Way: The Formulas You Need

To do this manually, you need to use: COUNTIF.

1. COUNTIF

Counts cells that meet a single condition.

Syntax: =COUNTIF(range, criteria)

  • range: The group of cells you want to count.
  • criteria: A number, expression, cell reference, or text string that determines which cells will be counted.

Example: =COUNTIF(B:B, ">500")

Understanding the Logic

You give it a range to look at, and a rule to check. If the rule is met, it counts +1.

The Final Formula:

=COUNTIF(B:B, ">500")

Conclusion

Now you know the "classic" way to solve this using formulas. It's a great skill to have.

But for those times when you just want the job done without the mental math, SheetXAI is there to help.

Boost your productivity today.
Start automating your spreadsheets.

Join thousands of professionals saving hours every week. No credit card required to start.

Learn more