COUNTIF vs COUNTIFS: The Complete Guide

COUNTIF vs COUNTIFS is the counting question every Excel user asks sooner or later. You want to know how many orders came from the North region, how many products are out of stock, how many times a customer has ordered in the last 30 days. That is where COUNTIF and COUNTIFS become useful.

They look similar, and many people confuse them. In this article, I will explain how each one works, when to use which, and how to count text, numbers, dates, and multiple conditions without pulling your hair out.

COUNTIF vs COUNTIFS in Excel

What Does COUNTIF Do?

COUNTIF counts cells that match one condition. The syntax is:

=COUNTIF(range, criteria)

The range is the cells you want to check. The criteria is what you are looking for. It can be a value, a text string, a number, a cell reference, or an expression.

Example:

=COUNTIF(A2:A100, "North")

This counts how many cells in A2:A100 contain “North”.

Counting Numbers

=COUNTIF(D2:D100, ">5000")

This counts values greater than 5000 in D2:D100.

Counting Text

=COUNTIF(B2:B100, "Pending")

This counts how many cells say “Pending”. Matches are not case-sensitive. “Pending” and “pending” both count.

Counting Wildcards

You can use wildcards in the criteria:

=COUNTIF(B2:B100, "Pen*")

This counts any text that starts with “Pen”, like Pending, Pending Approval, PenTest. The asterisk (*) matches any number of characters. The question mark (?) matches one character.

Counting Blanks and Non-Blanks

=COUNTIF(A2:A100, "")
=COUNTIF(A2:A100, "<>")

The first counts blank cells. The second counts non-blank cells. These are surprisingly useful for data cleanup.

What Does COUNTIFS Do?

COUNTIFS counts cells that match multiple conditions. The syntax is:

=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)

Example:

=COUNTIFS(A2:A100, "North", C2:C100, "Pending")

This counts rows where column A is “North” AND column C is “Pending”. Both conditions must be true.

The Main Difference

COUNTIF handles one condition.

COUNTIFS handles two or more conditions.

The syntax is different, too. COUNTIF starts with the range and then the criteria. COUNTIFS alternates between range and criteria for each condition. This looks simple, but it is the most common source of errors.

Common COUNTIFS Examples

Count orders from North region with revenue above 10,000:

=COUNTIFS(A2:A100, "North", D2:D100, ">10000")

Count orders from North region, status “Delivered”, in 2026:

=COUNTIFS(A2:A100, "North", C2:C100, "Delivered", B2:B100, ">="&DATE(2026,1,1), B2:B100, "<="&DATE(2026,12,31))

Count how many times a specific customer appears in an orders list:

=COUNTIFS(A2:A100, "CUST-1042")

That last example uses COUNTIFS with only one condition, which is fine. Many users prefer COUNTIFS for all counting formulas because it is more consistent and easier to extend.

Counting Dates

Date criteria confuse many users. The secret is to make sure your dates are real Excel dates, not text. Then use comparison operators like “>=” and “<=” with a DATE function or a cell reference.

Count orders in January 2026:

=COUNTIFS(B2:B100, ">="&DATE(2026,1,1), B2:B100, "<="&DATE(2026,1,31))

Count orders in the last 7 days (dynamic):

=COUNTIFS(B2:B100, ">="&TODAY()-7)

Count orders before today:

=COUNTIFS(B2:B100, "<"&TODAY())

These formulas stay useful because they update as the date changes. A report opened tomorrow still counts the last 7 days correctly.

Counting Text with OR Logic

COUNTIFS uses AND logic by default. Every condition must be true. If you want OR logic, count rows that match “Pending” OR “On Hold”, you have to combine formulas:

=COUNTIF(A2:A100, "Pending") + COUNTIF(A2:A100, "On Hold")

Or, using SUM with array:

=SUM(COUNTIF(A2:A100, {"Pending","On Hold"}))

This is a small trick worth knowing. It counts both values in one formula without needing two separate cells.

Counting with Cell References

Hard-coded criteria work for one-off reports, but cell references are more flexible.

Instead of:

=COUNTIF(A2:A100, "North")

Use:

=COUNTIF(A2:A100, F2)

Now you can change the region in F2 without editing the formula. For COUNTIFS:

=COUNTIFS(A2:A100, F2, C2:C100, G2)

This is how dashboards are built. The user picks a region and a status from drop-downs, and the numbers update automatically.

Counting Duplicates

To count how many times each value appears in a list:

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

Copy this down column B. Each row shows how many times the value in column A appears. Values greater than 1 are duplicates.

This is a simple but powerful way to audit a list before removing duplicates.

Try This on a Sample File

Open a blank workbook and type an orders table in A1:D21 with the headers Order ID, Region, Status, and Amount. Fill in twenty rows across North, South, and East, with statuses Delivered, Pending, and Cancelled, and amounts between 50 and 500. In F1 type North orders, and in G1 enter =COUNTIF(B2:B21, “North”). Verify the count by filtering the Region column to North. In F2 type Delivered in South, and in G2 enter =COUNTIFS(B2:B21, “South”, C2:C21, “Delivered”). In F3, count big orders with =COUNTIFS(D2:D21, “>200”, C2:C21, “Delivered”).

Now try a date rule. Add an Order Date column in E and count January orders with =COUNTIFS(E2:E21, “>=2026-01-01”, E2:E21, “<2026-02-01”). Also try counting with two text conditions at once, for example Delivered orders in the North region, and check the result by filtering both columns.

Replace a typed criterion with a cell reference: put Pending in F5 and use =COUNTIF(C2:C21, F5), then change F5 to Cancelled and watch the count change.

If a count returns zero, check for extra spaces in the text, use TRIM on the source data, and confirm the amount column holds numbers, not text.

When to Use COUNTIF

Use COUNTIF when you have a single condition and the formula is simple. For example, counting how many times a status appears, or how many values are above a threshold.

When to Use COUNTIFS

Use COUNTIFS when you need two or more conditions. It is the better choice for reporting, dashboards, and any audit that involves filters. Once you learn COUNTIFS, you will rarely go back to COUNTIF, because COUNTIFS can do everything COUNTIF can do.

A Quick Comparison

FeatureCOUNTIFCOUNTIFS
Number of conditionsOneMultiple
Syntax stylerange, criteriarange1, criteria1, range2, criteria2
Best forQuick countsDetailed reports
ExtendabilityLimitedHigh
Common useStatus countsRegion + status + date

Practical Example: Order Report

Suppose you have Order Date in A, Region in B, Status in C, and Revenue in D.

Count total orders from North:

=COUNTIF(B2:B500, "North")

Count orders from North with status “Delivered”:

=COUNTIFS(B2:B500, "North", C2:C500, "Delivered")

Count orders from North, “Delivered”, with revenue above 10,000:

=COUNTIFS(B2:B500, "North", C2:C500, "Delivered", D2:D500, ">10000")

Count orders in March 2026 from North:

=COUNTIFS(B2:B500, "North", A2:A500, ">="&DATE(2026,3,1), A2:A500, "<="&DATE(2026,3,31))

Each formula is a slightly deeper question. This is how real reporting works, you start with one filter and add more as the question becomes specific.

COUNTIFS with Wildcards

Wildcards work in COUNTIFS just as they do in COUNTIF, and they become more useful when you combine them with a second condition. The asterisk (*) matches any number of characters, and the question mark (?) matches exactly one character. For example, to count orders from the North region where the product name starts with “Pro”, write:

=COUNTIFS(A2:A100, "North", B2:B100, "Pro*")

This counts only rows where both conditions are true: the region is North and the product starts with Pro. The COUNTIF vs COUNTIFS choice matters here, with COUNTIF you could count every product starting with “Pro”, but only COUNTIFS lets you add the region filter in the same formula.

The question mark is useful when the pattern has a fixed length. For example, =COUNTIFS(B2:B100, “P-10?”) counts product codes like P-101, P-102 and P-109, but not P-1011, because ? matches exactly one character.

One trap to watch: if your data actually contains a literal asterisk or question mark, Excel treats it as a wildcard. To count a literal *, put a tilde (~) before it, like “~*”. In a COUNTIF vs COUNTIFS comparison for partial matches, the wildcard rules are identical, the difference is only how many conditions you can combine.

COUNTIF vs SUMIFS

Counting and summing answer different questions, and mixing them up is a common mistake. COUNTIF and COUNTIFS tell you how many rows match a condition. SUMIFS tells you the total value of those rows.

If your question is “how many orders came from the North region?”, COUNTIF vs COUNTIFS is the right comparison, COUNTIF is enough for one condition, COUNTIFS for several. But if your question is “how much revenue came from the North region?”, you need SUMIFS, not a counting formula, because counting rows will never give you a money total.

Frequently Asked Questions

Can COUNTIFS count with wildcards?

Yes. For example, =COUNTIFS(B2:B100, “Pen*”) counts cells starting with “Pen”.

Can COUNTIFS count blank cells?

Yes. Use “” as the criteria. To count blanks in a specific column, make sure all other ranges are the same size.

Why does my COUNTIFS return zero?

Common reasons: mismatched range sizes, text numbers, extra spaces, date format issues, or criteria that do not exactly match the data.

Can I count unique values with COUNTIFS?

Not directly. COUNTIFS counts all matching cells, not unique values. For unique counts, you need a formula like SUMPRODUCT(1/COUNTIF(…)) or the newer UNIQUE and COUNTA combination.

Can I use COUNTIFS to count rows where one cell is not blank and another condition is met?

Yes. Use “<>” as the criteria for the cell that must not be blank. For example, =COUNTIFS(C2:C100, “<>”, A2:A100, “North”) counts rows where column C is not blank and column A is North. This is useful for counting completed orders, where the status column must have a value and the region must match.

What is the difference between COUNTIF and COUNTA?

COUNTA counts every non-empty cell in a range, with no condition at all: =COUNTA(A2:A100) tells you how many cells have something in them. COUNTIF counts only the cells that match one condition, like =COUNTIF(A2:A100, “North”). Use COUNTA for a quick total of filled cells, and COUNTIF when you want to know how many of them match a specific value.

Related guide: SUMIF vs SUMIFS in Excel: Difference Explained with Examples

Related guide: How to Use IF, AND, OR in Excel Formulas

Final Thoughts

COUNTIF is great for quick counts. COUNTIFS is better for anything that needs more than one condition. Learn COUNTIFS first if you are serious about reporting, because it covers everything COUNTIF does and more. Combine it with cell references and DATE functions, and you can build counts that update automatically as your data and dates change.

Leave a Comment