How to write COUNTIF in Excel: syntax, examples, counting with two conditions, ? and * wildcards and common mistakes — based on Microsoft Support.