← All how-to recipes

How to count with multiple criteria (COUNTIFS)

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Count rows that satisfy several conditions at once — like region = East AND amount over 100.

The formula

AppFormulaNotes
Excel (desktop)=COUNTIFS(A2:A6,"East",B2:B6,">100")Add more range/criteria pairs for more conditions.
Google Sheets=COUNTIFS(A2:A6,"East",B2:B6,">100")Identical.
LibreOffice Calc=COUNTIFS(A2:A6,"East",B2:B6,">100")Identical.

How it works

COUNTIFS takes range/criteria pairs and counts rows where every condition holds. Here three rows are "East" but only two of them exceed 100 (150 and 200 — the 80 fails), so the count is 2. All conditions are ANDed; for OR logic, add separate COUNTIFS together or use SUMPRODUCT.

Verified, not just documented

We ran =COUNTIFS(A2:A6,"East",B2:B6,">100") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 2 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 2 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

COUNTIFS — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons