---
title: "COUNTIFS in Google Sheets: syntax and examples | ExcelSavvy"
description: "Counts the rows that meet every one of several conditions. With examples and exercises in Google Sheets."
canonical_url: "https://excelsavvy.com/sheets/functions/countifs"
meta:
  "og:description": "Counts the rows that meet every one of several conditions. With examples and exercises in Google Sheets."
  "og:image": "https://excelsavvy.com/_og/d/c_Page%2Ctitle_~Q09VTlRJRlMgaW4gR29vZ2xlIFNoZWV0czogc3ludGF4IGFuZCBleGFtcGxlcw%2Cdescription_Counts%2Bthe%2Brows%2Bthat%2Bmeet%2Bevery%2Bone%2Bof%2Bseveral%2Bconditions.%2BWith%2Bexamples%2Band%2Bexercises%2Bin%2BGoogle%2BSheets.%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~Q09VTlRJRlMoY3JpdGVyaWFfcmFuZ2UxLCBjcml0ZXJpYTEsIFtjcml0ZXJpYV9yYW5nZTIsIGNyaXRlcmlhMl0sIC4uLik%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL2NvdW50aWZzIg%2Cs_HkTeVS51_DkI_oHB.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "COUNTIFS in Google Sheets: syntax and examples | ExcelSavvy"
  "twitter:image": "https://excelsavvy.com/_og/d/c_Page%2Ctitle_~Q09VTlRJRlMgaW4gR29vZ2xlIFNoZWV0czogc3ludGF4IGFuZCBleGFtcGxlcw%2Cdescription_Counts%2Bthe%2Brows%2Bthat%2Bmeet%2Bevery%2Bone%2Bof%2Bseveral%2Bconditions.%2BWith%2Bexamples%2Band%2Bexercises%2Bin%2BGoogle%2BSheets.%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~Q09VTlRJRlMoY3JpdGVyaWFfcmFuZ2UxLCBjcml0ZXJpYTEsIFtjcml0ZXJpYV9yYW5nZTIsIGNyaXRlcmlhMl0sIC4uLik%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL2NvdW50aWZzIg%2Cs_HkTeVS51_DkI_oHB.png"
---

> Index of every page on this site: [llms.txt](https://excelsavvy.com/llms.txt)

# **COUNTIFS in Google Sheets**

Counts the rows that meet every one of several conditions. Use the same range twice to count between two limits.

=

COUNTIFS(

## **In Google Sheets**

COUNTIFS takes the same pairs of range and criterion in Google Sheets, and every range must be the same size.

## **How to use COUNTIFS**

COUNTIFS counts the rows where every condition is true. Think of a staff list: how many people are in Sales and started after January 1? Each condition checks one column, and a row is counted only when it passes all the checks.

Unlike SUMIFS there is no range to add, so the formula is just pairs of range and condition: `**=COUNTIFS(A2:A10,"North",B2:B10,"Shoes")**`. Each pair checks its own column, all ranges must have the same number of rows, and you can use up to 127 pairs.

To keep values between two limits, use the same range twice: `**=COUNTIFS(C2:C10,">=200",C2:C10,"<=400")**` counts values from 200 up to and including 400. The same trick works for a period of dates. With the limits in cells, write `**">="&F1**`.

With a single condition you can use the shorter COUNTIF. To add up amounts for the rows that match, use SUMIFS.

## **Syntax**

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

<dl><dt>**criteria_range1 **</dt>
<dd>The cells the first condition is checked against.</dd>
<dt>**criteria1 **</dt>
<dd>The first condition.</dd>
<dt>**criteria_range2, criteria2 **(optional)</dt>
<dd>More range and condition pairs, up to 127.</dd></dl>

## **Examples**

E1`=COUNTIFS(<sup>1</sup>A2:A6,<sup>2</sup>"North",<sup>3</sup>B2:B6,<sup>4</sup>"Shoes")`

|  | A | B | C | D | E |
| --- | --- | --- | --- | --- | --- |
| 1 | Region | Product | Sales |  | **2** |
| 2 | North | Shoes | 500 |  | |
| 3 | South | Shoes | 300 |  | |
| 4 | North | Bags | 250 |  | |
| 5 | North | Shoes | 420 |  | |
| 6 | South | Bags | 180 |  | |

**In plain words:** Count the rows where <sup>1</sup>the region in A2:A6 is <sup>2</sup>North and <sup>3</sup>the product in B2:B6 is <sup>4</sup>Shoes.

E1=COUNTIFS(C2:C6,">=200",C2:C6,"<=400")

|  | A | B | C | D | E |
| --- | --- | --- | --- | --- | --- |
| 1 | Region | Product | Sales |  | **2** |
| 2 | North | Shoes | 500 |  | |
| 3 | South | Shoes | 300 |  | |
| 4 | North | Bags | 250 |  | |
| 5 | North | Shoes | 420 |  | |
| 6 | South | Bags | 180 |  | |

## **Common COUNTIFS mistakes**

- COUNTIFS rejects my second condition

  Every condition needs its own range in front of it. When both conditions are on the same column, repeat the range: `**=COUNTIFS(C2:C6,">=200",C2:C6,"<=400")**`.
- COUNTIFS returns #VALUE!

  The ranges are not the same size, as in `**=COUNTIFS(A2:A6,"North",B2:B7,"Shoes")**`. Make every range cover the same rows.
- COUNTIFS returns 0 when I ask for two values in the same column

  The conditions are joined with AND, and no cell is both North and South, so `**=COUNTIFS(A2:A6,"North",A2:A6,"South")**` gives 0. Add two COUNTIF formulas instead: `**=COUNTIF(A2:A6,"North")+COUNTIF(A2:A6,"South")**`.
- COUNTIFS counts fewer rows than I expect

  One of the conditions is failing on a hidden difference, such as a space at the end of a name or numbers stored as text. Test each pair on its own with COUNTIF to find the one that drops rows.

## **Practice COUNTIFS**

- [**1****COUNTIFS with two conditions**→](https://excelsavvy.com/sheets/practice/countifs/countifs-two-conditions)
- [**2****Count between two numbers with COUNTIFS**→](https://excelsavvy.com/sheets/practice/countifs/countifs-between-two-numbers)
- [**3****Count the orders between two dates**→](https://excelsavvy.com/sheets/practice/countifs/countifs-between-two-dates)
- [**4****COUNTIFS with the conditions in cells**→](https://excelsavvy.com/sheets/practice/countifs/countifs-criteria-from-cells)

## **Related functions**

- [**COUNTIF**](https://excelsavvy.com/sheets/functions/countif)
- [**SUMIFS**](https://excelsavvy.com/sheets/functions/sumifs)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://excelsavvy.com/#identity","@type":"Organization","name":"ExcelSavvy","url":"https://excelsavvy.com/","logo":{"@id":"https://excelsavvy.com/#logo"}},{"@id":"https://excelsavvy.com/#website","@type":"WebSite","inLanguage":"en-US","name":"ExcelSavvy","url":"https://excelsavvy.com/","alternateName":["Excel Savvy","ExcelSavvy.com","PracticeExcel","Practice Excel Online"],"publisher":{"@id":"https://excelsavvy.com/#identity"},"workTranslation":[{"@id":"https://excelopgaver.dk/#website"},{"@id":"https://excelpraxis.de/#website"}]},{"@id":"https://excelsavvy.com/sheets/functions/countifs#webpage","@type":"WebPage","dateModified":"2026-11-16","description":"Counts the rows that meet every one of several conditions. With examples and exercises in Google Sheets.","name":"COUNTIFS in Google Sheets: syntax and examples","url":"https://excelsavvy.com/sheets/functions/countifs","breadcrumb":{"@id":"https://excelsavvy.com/sheets/functions/countifs#breadcrumb"},"isPartOf":{"@id":"https://excelsavvy.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://excelsavvy.com/sheets/functions/countifs"]}],"primaryImageOfPage":{"@id":"https://excelsavvy.com/#logo"}},{"@id":"https://excelsavvy.com/sheets/functions/countifs#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://excelsavvy.com","position":1},{"@type":"ListItem","name":"Google Sheets practice exercises","item":"https://excelsavvy.com/sheets","position":2},{"@type":"ListItem","name":"COUNTIFS in Google Sheets: syntax and examples","position":3}]},{"@id":"https://excelsavvy.com/sheets/functions/countifs#article","dateModified":"2026-11-16","description":"Counts the rows that meet every one of several conditions. With examples and exercises in Google Sheets.","headline":"COUNTIFS in Google Sheets: syntax and examples","inLanguage":"en-US","thumbnailUrl":"https://excelsavvy.com/_og/d/c_Page%2Ctitle_~Q09VTlRJRlMgaW4gR29vZ2xlIFNoZWV0czogc3ludGF4IGFuZCBleGFtcGxlcw%2Cdescription_Counts%2Bthe%2Brows%2Bthat%2Bmeet%2Bevery%2Bone%2Bof%2Bseveral%2Bconditions.%2BWith%2Bexamples%2Band%2Bexercises%2Bin%2BGoogle%2BSheets.%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~Q09VTlRJRlMoY3JpdGVyaWFfcmFuZ2UxLCBjcml0ZXJpYTEsIFtjcml0ZXJpYV9yYW5nZTIsIGNyaXRlcmlhMl0sIC4uLik%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL2NvdW50aWZzIg%2Cs_HkTeVS51_DkI_oHB.png","@type":["Article","TechArticle"],"author":{"@id":"https://excelsavvy.com/#identity"},"image":{"@id":"https://excelsavvy.com/#/schema/image/1"},"isPartOf":{"@id":"https://excelsavvy.com/sheets/functions/countifs#webpage"},"mainEntityOfPage":{"@id":"https://excelsavvy.com/sheets/functions/countifs#webpage"},"publisher":{"@id":"https://excelsavvy.com/#identity"}},{"@id":"https://excelsavvy.com/#logo","@type":"ImageObject","caption":"ExcelSavvy","contentUrl":"https://excelsavvy.com/brand/practiceexcel/icon-512.png?v=3","inLanguage":"en-US","url":"https://excelsavvy.com/brand/practiceexcel/icon-512.png?v=3"},{"@id":"https://excelsavvy.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://excelsavvy.com/_og/d/c_Page%2Ctitle_~Q09VTlRJRlMgaW4gR29vZ2xlIFNoZWV0czogc3ludGF4IGFuZCBleGFtcGxlcw%2Cdescription_Counts%2Bthe%2Brows%2Bthat%2Bmeet%2Bevery%2Bone%2Bof%2Bseveral%2Bconditions.%2BWith%2Bexamples%2Band%2Bexercises%2Bin%2BGoogle%2BSheets.%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~Q09VTlRJRlMoY3JpdGVyaWFfcmFuZ2UxLCBjcml0ZXJpYTEsIFtjcml0ZXJpYV9yYW5nZTIsIGNyaXRlcmlhMl0sIC4uLik%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL2NvdW50aWZzIg%2Cs_HkTeVS51_DkI_oHB.png","inLanguage":"en-US","url":"https://excelsavvy.com/_og/d/c_Page%2Ctitle_~Q09VTlRJRlMgaW4gR29vZ2xlIFNoZWV0czogc3ludGF4IGFuZCBleGFtcGxlcw%2Cdescription_Counts%2Bthe%2Brows%2Bthat%2Bmeet%2Bevery%2Bone%2Bof%2Bseveral%2Bconditions.%2BWith%2Bexamples%2Band%2Bexercises%2Bin%2BGoogle%2BSheets.%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~Q09VTlRJRlMoY3JpdGVyaWFfcmFuZ2UxLCBjcml0ZXJpYTEsIFtjcml0ZXJpYV9yYW5nZTIsIGNyaXRlcmlhMl0sIC4uLik%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL2NvdW50aWZzIg%2Cs_HkTeVS51_DkI_oHB.png"}]}
```

## Sitemap

See the full [sitemap](https://excelsavvy.com/sitemap.md) for all pages.
