How to use COUNTIFS (count with multiple conditions)
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Count rows that satisfy several conditions at once — orders that are East AND over $100.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =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. 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
- How to count cells between two values
- How to count dates within a range
- How to count with multiple criteria (COUNTIFS)
- How to rank values within groups