COUNTIF takes two arguments — the range of cells to examine and the value (criteria) you want to count. It walks through each cell in the range, compares it to the criteria using an exact match, and adds one to a running total every time it finds a match. Text comparisons are case-insensitive, so Approved and APPROVED both count as the same value, which is usually what you want but occasionally trips people up with mixed-case data. Number comparisons match the underlying stored value, not the display format, so a cell showing 1,000 and one showing 1000 both count as the same number as long as the stored value is 1000. Empty cells are ignored entirely. If the criteria does not appear in the range at all, COUNTIF returns 0 rather than an error — it is genuinely hard to break. For counting with more than one condition at the same time, you step up to COUNTIFS, and if you need to count only cells that are not equal to a value, the
count cells not equal to a value formula is the mirror image of this one.