Sample Data
This table lists fruits in column A and their quantities in column B.
| Cell | Value |
|---|---|
| A1 | Fruit |
| A2 | Apple |
| A3 | Banana |
| A4 | Apple |
| A5 | Orange |
| A6 | Banana |
| B1 | Quantity |
| B2 | 10 |
| B3 | 5 |
| B4 | 15 |
| B5 | 8 |
| B6 | 7 |
This table lists fruits in column A and their quantities in column B.
| Cell | Value |
|---|---|
| A1 | Fruit |
| A2 | Apple |
| A3 | Banana |
| A4 | Apple |
| A5 | Orange |
| A6 | Banana |
| B1 | Quantity |
| B2 | 10 |
| B3 | 5 |
| B4 | 15 |
| B5 | 8 |
| B6 | 7 |
=COUNTIF(A2:A6, "Apple") + COUNTIFS(A2:A6, "Banana", B2:B6, ">5")A B +-------+-------+ 1 | Fruit |Quantity| +-------+-------+ 2 | Apple | 10 | <-- 3 | Banana| 5 | <-- 4 | Apple | 15 | <-- 5 | Orange| 8 | <-- 6 | Banana| 7 | <-- Arrows show cells referenced in formula ranges A2:A6 and B2:B6.
A B C +-------+-------+-------+ 1 | Fruit |Quantity|Result | +-------+-------+-------+ 2 | Apple | 10 | | 3 | Banana| 5 | | 4 | Apple | 15 | | 5 | Orange| 8 | | 6 | Banana| 7 | 3 | Cell C6 contains the formula result 3.
COUNTIF function do in Google Sheets?COUNTIFS function?=COUNTIFS(A1:A5, ">=20", A1:A5, "<=40")?=COUNTIFS(A1:A5, ">10", B1:B5, "<20") but it returns 0. The data in A1:A5 is {5, 15, 25, 35, 45} and in B1:B5 is {10, 20, 20, 25, 30}. What is the error?Region (A2:A10), Sales (B2:B10). You want to count how many sales are greater than 1000 in the "East" region. Which formula correctly does this?Pass the test and this pattern moves unknown