← All how-to recipes

How to use COUNTIFS (count with multiple conditions)

✓ Verified in LibreOffice 25.8.7.3

Count rows that satisfy several conditions at once — orders that are East AND over $100.

The formula

AppFormulaNotes
Excel=COUNTIFS(A2:A10,"East",B2:B10,">100")Range/criteria pairs, all ANDed. Same argument pattern for one condition or five.
Google Sheets=COUNTIFS(A2:A10,"East",B2:B10,">100")Identical.
LibreOffice Calc=COUNTIFS(A2:A10,"East",B2:B10,">100")Identical.

How it works

COUNTIFS counts rows where every range/criteria pair is true. Three rows are "East" but only two of them are also over 100 (150 and 200 — the East row of 80 fails), so the count is 2. Unlike SUMIFS there's no separate value range — COUNTIFS just counts matching rows. All conditions are ANDed together; for OR logic, add separate COUNTIFS or use SUMPRODUCT. Criteria take comparisons (">100"), wildcards ("E*"), and cell references (">"&C1). Two date-bound pairs count rows in a period, and unlike the plain COUNTIF, the criteria ranges must all be the same size.

Verified, not just documented

We ran =COUNTIFS(A2:A5,"East",B2:B5,">100") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 2 — exactly the expected result. Every formula here is confirmed by actually executing it.