COUNTIF Function in Excel

COUNTIF counts cells that meet a single condition.

1 min read · Updated 17 Oct 2026 · By Md. Saiful Islam · বাংলায় পড়ুন

What is the COUNTIF Function

The COUNTIF function counts how many cells in a range meet a condition you specify. It is one of the most used functions for tallying categories, flags, or threshold values. The condition can be text, a number, a comparison, or a wildcard pattern.

Formula: =COUNTIF(range, criteria)

Practical Example 1

Column C contains grades A, B, C, A, B, A, C, A, D, B. You want the count of A grades.

Type: =COUNTIF(C2:C11, A)

Result: 5

Practical Example 2

Count orders above 1000 in column D.

Type: =COUNTIF(D2:D100, >1000)

Result: the number of orders above 1000

Practical Example 3

Count product names starting with Pen.

Type: =COUNTIF(A2:A100, Pen*)

Result: the number of products starting with Pen

Practical Example 4

Count blank cells using COUNTIF.

Type: =COUNTIF(A2:A100, )

Result: the number of blank cells

When to Use It

COUNTIF is used for grade distribution in education, for counting orders above a threshold in sales, for attendance counting in HR, for category counting in inventory, and for any report that needs conditional counting.

Get one practical IE tip every week

Join IE and production professionals learning with in2eff.