Use the COUNTIF function, to count cells that do not contain specific text or number. In our example, we will count cell based on two criteria.
How the formula works
The formula used above has following arguments:
range (A5:A9) – The range of cells to count based on the criteria.
criteria (“<>*RB*”) – The criteria to count only those cells that do not have “RB”, where the symbol “*” is an asterisk which means “match any number of characters” and “<>” means “does not equal to”.