COUNTIF practice in Google Sheets
COUNTIF counts the cells in a range that meet one condition. In Google Sheets it takes the same two arguments as in Excel and understands the same operators and wildcards.
- 1COUNTIF with a text conditionIn D2, use COUNTIF to count how many orders in B2:B8 came from Copenhagen.
- 2COUNTIF with a number conditionPremiumIn D2, use COUNTIF to count the invoices in B2:B8 of 1500 or more.
- 3COUNTIF with the limit in a cellPremiumIn E2, count the products in B2:B7 with stock below the reorder level in E1. Join "<" and E1 with &, so the count follows when E1 changes.
- 4Count everything except one valuePremiumIn E1, count the tickets in B2:B8 whose status is anything but Closed. "Not equal to" is <>, so the criterion is "<>Closed".
- 5Count with a wildcardPremiumIn D1, count the products in A2:A8 with the word Chair anywhere in the name. * stands for any text, so the criterion is "*Chair*".
Functions in this topic
Questions
How do I count cells that are not empty with COUNTIF in Google Sheets?
Use "<>" as the criterion: =COUNTIF(A2:A10,"<>") counts every cell in A2:A10 that is not empty, as it does in Excel.