countif
COUNTIF is a spreadsheet function that counts the number of cells within a range that meet a specified condition. It is available in spreadsheet programs such as Microsoft Excel and Google Sheets. The syntax is COUNTIF(range, criterion). The range must be a contiguous block of cells; the criterion defines what to count and can be a number, a text string, an expression, or a reference to a cell.
Criteria can include wildcards: an asterisk (*) matches any sequence of characters, and a question mark (?) matches
COUNTIF is not case-sensitive: "Apple" and "apple" are counted the same. It can also count blank cells
Common uses include tallying occurrences of categories, flagging data that meets thresholds, and validating inputs. COUNTIF