3 min read

TAKE A BREAK

COUNTIFS Google Sheets: How to Count Rows With Two Conditions

Tech
Updated: 12/1/2026
COUNTIFS Google Sheets: How to Count Rows With Two Conditions
#Spreadsheets
Learn the COUNTIFS Google Sheets syntax with a sales table example: count rows by region and month, compare COUNTIF and FILTER, and fix common errors.

If you're looking for a COUNTIFS Google Sheets formula that counts rows meeting two conditions, the short answer is: =COUNTIFS(range1, criterion1, range2, criterion2). It returns one number, the count of rows where every condition is true. On a sales sheet, that means you can count "North region sales in January" without filtering a single row.

Use COUNTIFS when you need one number and all conditions must match. Use COUNTIF when you only have one condition, and FILTER when you need to see the matching rows themselves.

How the COUNTIFS Google Sheets syntax works

COUNTIFS takes its arguments in pairs. Each pair is a range to check and a criterion to test against that range. Google's help page for COUNTIF notes that COUNTIF can only perform a conditional count with a single criterion, and that multiple criteria call for COUNTIFS or the database functions DCOUNT or DCOUNTA (Google Docs Editors Help).

A criterion can be:

  • Text in double quotes, such as "North"
  • A number, such as 1000
  • A comparison, such as ">1000" or "<>" (not empty)
  • A cell reference, such as E2

Every range in the formula must cover the same number of rows. We'll come back to that in the troubleshooting section.

Our sample sales sheet

The examples use headers in row 1 and data in A2:C11. Column A holds the region, column B holds the month typed as text (such as "January"), and column C holds the sales amount. The numbers are sample data made for this walkthrough.

RowRegionMonthAmount
2NorthJanuary1200
3SouthJanuary850
4NorthFebruary950
5EastJanuary400
6NorthJanuary1500
7SouthFebruary1100
8WestMarch700
9NorthMarch1300
10EastFebruary650
11SouthMarch2000

Count rows with two conditions

Start with the most common case. This formula counts North region sales in January:

=COUNTIFS(A2:A11,"North",B2:B11,"January")

The result is 2, from rows 2 and 6. Row 4 is North but February, and row 5 is January but East, so neither counts. Both conditions have to be true in the same row.

Swap the second condition for a number test to count January sales of 1,000 or more:

=COUNTIFS(B2:B11,"January",C2:C11,">=1000")

The result is 2. January has four rows, but only rows 2 and 6 meet the threshold. Text and number tests can be mixed freely in one formula.

Use two tests for a between range

To count amounts between two values, apply two tests to the same column. This counts sales from 500 up to, but not including, 1,000:

=COUNTIFS(C2:C11,">=500",C2:C11,"<1000")

The result is 4: rows 3, 4, 8, and 10, with amounts of 850, 950, 700, and 650. The range repeats because each test needs its own pair, and both tests look at the same column. Ben Collins's COUNTIFS guide uses the same pattern for between tests (Ben Collins).

When you need OR logic

COUNTIFS applies AND logic, so every condition must be met (SheetAI). For OR, the usual workaround is to add two COUNTIFS calls. This counts rows that are North or South:

=COUNTIFS(A2:A11,"North")+COUNTIFS(A2:A11,"South")

The result is 7: four North rows and three South rows. This works cleanly when both conditions sit in the same column, because a single row can't be North and South at once. If your conditions could overlap across different columns, a row that matches both would be counted twice, and you'd need a third COUNTIFS to subtract the overlap.

Here's a mistake that shows up often. This formula looks like it should work, but it doesn't:

=COUNTIF(A2:A11,"North")+COUNTIF(B2:B11,"January")

It returns 8 (four North rows plus four January rows), not 2. Each COUNTIF checks one column in isolation and never sees the value in the other column on the same row. Nesting or adding COUNTIF calls can't match rows across columns the way COUNTIFS does.

COUNTIFS vs. COUNTIF vs. FILTER

Use this table as a quick rule:

Your goalUseResult on the sample sheet
One conditionCOUNTIFCOUNTIF(A2:A11,"North") = 4
Two or more conditions, all must matchCOUNTIFSNorth and January = 2
OR across one columnTwo COUNTIFS addedNorth or South = 7
See the matching rowsFILTERReturns rows 2 and 6
Count FILTER resultsROWS or COUNTA around FILTERROWS(FILTER(...)) = 2

FILTER returns the matching rows instead of a number. This formula shows the two North January rows:

=FILTER(A2:C11,A2:A11="North",B2:B11="January")

To get a count from FILTER, wrap it in ROWS or COUNTA. OWOX explains that FILTER returns matching rows rather than counting them, and covers the COUNT and COUNTA differences in its guide (OWOX).

Watch out: when nothing matches, FILTER returns an error, and COUNTA counts that error as 1. A zero can show up as a 1. Test the formula with a region that doesn't exist, such as "Mars". COUNTIFS returns 0 in that case, which makes it the safer choice for a pure count (OWOX).

Rule of thumb: if you need a number, use COUNTIFS. If you need the rows, use FILTER. If you want a grid of totals by region and month, a pivot table is the better tool. Our guide to making a pivot table in Google Sheets walks through the steps.

Month as text or as a real date

The January examples work because the Month column holds text. If your sheet stores real dates, such as 1/15/2026, a text criterion like "January" returns 0, because the cells contain a date rather than the word. Use a date range instead.

This counts every date in January 2026 in column D:

=COUNTIFS(D2:D500,">="&DATE(2026,1,1),D2:D500,"<"&DATE(2026,2,1))

The formula uses the first day of January as the start and the first day of February as the end. That catches every January date, including ones with times attached. To add a region filter in column E, append E2:E500,"North" as another pair.

If a month count looks off, check whether the column holds real dates or text that only looks like a date. Those two behave differently in COUNTIFS.

Troubleshooting when the count is wrong or returns an error

If your COUNTIFS returns 0 or a lower number than you expected, check these four things first:

  1. Typos and extra spaces. "Nroth" won't match "North", and a trailing space won't match either. Matching isn't case-sensitive, so "north" does match "North", but spelling and spaces still matter. A dropdown list keeps entries consistent. We cover the setup in our dropdown list guide.
  2. Mismatched range sizes. Every range must span the same number of rows. =COUNTIFS(A2:A11,"North",B2:B12,"January") returns an error because column A covers 10 rows and column B covers 11. Keep every range on the same rows, such as A2:A11 and B2:B11.
  3. Text vs. real dates. Covered above. A text criterion won't match date cells.
  4. Duplicate entries. If the same sale appears twice, the count is inflated rather than too low. Remove duplicates before you count. Our duplicate removal guide compares three methods.

A real-world case: counting projects by status

The same two-condition pattern works for any list you keep in a sheet. If you track side projects with a status column in A and a category column in B, =COUNTIFS(A2:A20,"Active",B2:B20,"Writing") counts the active writing projects. For a small list, a sheet does the job.

If your list is really a project list, a dedicated tool can handle the tracking. continuu.it is a project tool where every project has a state: Active, Paused, Killed or Completed, so a stalled project doesn't sit there looking alive. Tasks live inside each project, notes keep the context you'd otherwise have to rebuild, and killed projects go to a Graveyard. Its analytics compare how much you start against how much you finish. A free plan is available, and it's built for freelancers, students with long projects, and side-project builders. It isn't a spreadsheet or a docs tool, so for formulas, Sheets is still the right place. Think of it this way: COUNTIFS does the counting, and a project tool keeps the projects themselves.

Frequently asked questions

Can COUNTIFS count with a greater-than condition?

Yes. Put the operator and number in quotes. =COUNTIFS(C2:C11,">1000") returns 5 for the sample sheet, from rows 2, 6, 7, 9, and 11.

What is the difference between COUNTIF and COUNTIFS?

COUNTIF takes one range and one criterion. COUNTIFS takes one or more pairs and counts only the rows where all of them match. Google's help page confirms the single-criterion limit of COUNTIF.

Why does my COUNTIFS return 0 or too few rows?

Usually because of a typo, a text month compared against real dates, or ranges of different sizes. The troubleshooting list above covers each one.

How do I count cells that are not blank?

Use "<>" as the criterion. =COUNTIFS(C2:C11,"<>",A2:A11,"North") counts North rows with an amount entered. On the sample sheet, all four North rows have amounts, so the result is 4.

The takeaway

COUNTIFS counts rows where every condition is true, in one formula. Use two or more pairs for AND logic, add two COUNTIFS calls for OR within one column, use date bounds for real dates, and switch to FILTER when you need the rows themselves. For more step-by-step Sheets guides, browse 3minread. If you want a good next read, our pivot table walkthrough shows how to summarize the same kind of sales data.