XcelFormulas
  • Excel Formulas
  • Formula by Task
  • Most Used Formulas

Archives

  • September 2026

Categories

  • Excel Formulas
  • Excel Formulas
  • Formula by Task
  • Most Used Formulas
0 Likes
0 Followers
0 Followers
XcelFormulas
XcelFormulas
  • Excel Formulas
  • Formula by Task
  • Most Used Formulas
COUNTIF Function in Excel
  • Excel Formulas

COUNTIF Function in Excel

  • September 30, 2026
  • mopix
Total
0
Shares
0
0
0
Total
0
Shares
Share 0
Tweet 0
Pin it 0
Share 0
Share 0
Share 0
What To Read Hide
  1. What is COUNTIF Function in Excel
  2. Syntax of COUNTIF Function in Excel
  3. Basic COUNTIF Function examples
  4. Criteria types you’ll use most in COUNTIF Function
  5. Using wildcards
  6. Counting blank and non-blank cells
  7. COUNTIF with dates
  8. Finding duplicates
  9. COUNTIF vs COUNTIFS
  10. Common mistakes and how to fix them
  11. Frequently asked questions
    1. Can COUNTIF count with more than one condition?
    2. Is COUNTIF case-sensitive?
    3. Can COUNTIF work across multiple sheets?
    4. What’s the difference between COUNT, COUNTA, and COUNTIF?
    5. Does COUNTIF work in Google Sheets?

When you use the COUNTIF Function in Excel, it tells you how many cells in an area meet a certain condition. COUNTIF(range, criteria) is the general syntax. “Range” is the list of cells to count, and “criteria” is a condition that a cell must meet in order to be counted. You can use COUNTIF to find the number of cells that have dates, numbers, and text in them. Criteria can use wildcards (*, ?), logical operators (>, <, <>, =), and more.

What is COUNTIF Function in Excel

Spreadsheets are important in several sectors of enterprises for calculating effectively and exactly. In Microsoft Excel, the COUNTIF tool keeps track of how many cells in an area meet a certain set of conditions.

As the title says, the COUNTIF function mixes the “Count” and “IF” formulas together. The function is built into Excel and is called a statistical operation. It can be accessed in Excel as a worksheet tool (WS).

In simple terms, COUNTIF Excel counts cells across a number of groups according to one or more conditions. It incorporates conditional logic into the equation to count those cells that fulfill particular requirements.

With an advanced Excel training, you can learn in-depth about the different functionalities of Excel.

ALSO READ: XLOOKUP Function in Excel

Syntax of COUNTIF Function in Excel

=COUNTIF(range, criteria)
  • range – The range of cells that Excel checks to determine which cells meet the specified criteria.
  • criteria – The condition or value that Excel uses to decide which cells should be counted.

Basic COUNTIF Function examples

Here’s a small order sheet. Column B holds the payment status, and the formula in E2 counts the
“Paid” rows. Four cells say “Paid”, so Excel returns 4.

Criteria types you’ll use most in COUNTIF Function

Pro tip:
Referencing a cell is worth getting used to. If D1 holds "Paid", you can change D1 to "Pending" and the count updates without touching the formula.

Using wildcards

Wildcards let you match part of a text value. There are three:

  • =COUNTIF(A2:A100, “Rahul*”) counts every name that starts with Rahul.
  • =COUNTIF(A2:A100, “shirt“) counts every cell containing “shirt” anywhere, so “T-shirt” and
    “Shirt XL” both match.
  • =COUNTIF(A2:A100, “??”) counts cells with exactly two characters, handy for spotting bad state codes.

Counting blank and non-blank cells

Data is rarely tidy, so these two come up constantly:

If you only want to know how many cells are filled, COUNTA does the same job. COUNTIF is the better choice when you’re combining a blank check with other logic.

COUNTIF with dates

Dates are stored as serial numbers in Excel, so comparison operators work on them. Two safe ways to write it:

=COUNTIF(C2:C100, ">"&DATE(2026,1,1))
Counts dates after January 1, 2026.
=COUNTIF(C2:C100, "<"&TODAY())
Counts dates before today.

Finding duplicates

Type this next to your data and copy it down:

=COUNTIF($A$2:$A$100, A2)

If the result is greater than 1, that value appears more than once. The dollar signs lock the range so it doesn’t shift as you fill down. To flag only the repeats, use =COUNTIF($A$2:A2, A2)>1.

COUNTIF vs COUNTIFS

COUNTIF handles one condition. When you need several conditions at once, switch to COUNTIFS:

=COUNTIFS(B2:B100, "Paid", D2:D100, ">500")

Common mistakes and how to fix them

Frequently asked questions

Can COUNTIF count with more than one condition?

Not on its own. Use COUNTIFS for AND logic, or add multiple COUNTIF results for OR logic.

Is COUNTIF case-sensitive?

No. Uppercase and lowercase are treated the same.

Can COUNTIF work across multiple sheets?

Each COUNTIF looks at one range on one sheet. To combine sheets, add formulas together, for example:

=COUNTIF(Sheet1!A:A,"Paid")+COUNTIF(Sheet2!A:A,"Paid")

What’s the difference between COUNT, COUNTA, and COUNTIF?

COUNT counts numeric cells, COUNTA counts any non-empty cell, and COUNTIF counts cells that meet a condition you define.

Does COUNTIF work in Google Sheets?

Yes. The syntax is identical, so everything in this guide works there too.

Total
0
Shares
Share 0
Tweet 0
Pin it 0
Related Topics
  • COUNTIF Formula
  • COUNTIF Formula in Excel
  • COUNTIF Function in Excel
  • Excel Beginner Tips
  • Excel COUNTIF
  • Excel Data Analysis
  • Excel Formulas
  • Excel Functions
  • Excel Spreadsheet Tips
  • Excel Tips
  • Excel Tutorial
  • How to Use COUNTIF
  • Microsoft Excel
mopix

Previous Article
SUMIF Function in Excel
  • Excel Formulas

SUMIF Function in Excel

  • September 18, 2026
  • mopix
View Post
You May Also Like
SUMIF Function in Excel
View Post
  • Excel Formulas

SUMIF Function in Excel

  • mopix
  • September 18, 2026
Excel VLOOKUP Function
View Post
  • Excel Formulas

VLOOKUP Function in Excel

  • mopix
  • September 17, 2026
https://support.microsoft.com/en-us/office/lifecycle/officeinstall/download-and-install-or-reinstall-office-2021-office-2019-or-office-2016
View Post
  • Excel Formulas

XLOOKUP Function in Excel

  • mopix
  • September 14, 2026
Recent Posts
  • SUMIF Function in Excel
    SUMIF Function in Excel
    • September 18, 2026
  • Excel VLOOKUP Function
    VLOOKUP Function in Excel
    • September 17, 2026
  • https://support.microsoft.com/en-us/office/lifecycle/officeinstall/download-and-install-or-reinstall-office-2021-office-2019-or-office-2016
    XLOOKUP Function in Excel
    • September 14, 2026
XcelFormulas
  • Contact Us
  • Privacy Policy
  • Terms and Conditions
  • Cookie Policy
  • Disclaimer
  • Sitemap
Excel Formulas & Functions

Input your search keywords and press Enter.