Returns a conditional count across a range. Learn more
In Google Sheets, COUNTIF is a function that counts the number of cells within a range that meet a specified criterion.
The COUNTIF function takes two arguments: the range of cells to be counted, and the criterion that must be met for a cell to be included in the count. The criterion can be a text string, a number, a cell reference, or an expression that evaluates to a value.
To use the COUNTIF function in Google Sheets, enter the function followed by the range and the criterion within the parentheses.
For example, if you want to count the number of cells in the range A1:A10 that contain the text "apple", you would enter the formula "=COUNTIF(A1:A10, "apple")" into a cell.
You can also use the COUNTIF function to count cells based on other criteria, such as values greater than a certain number, by using comparison operators like ">" or "<".
For example, to count the number of cells in the range A1:A10 that contain values greater than 5, you would enter the formula "=COUNTIF(A1:A10, ">5")".