In Microsoft Excel (part of the Microsoft Office productivity suite), you can count the number of times a string (a piece of text) appears in a range of cells.
Let’s take the following table as an example:
|Option A||Option B||Option C||Totals|
To get the totals automatically (in other words: how many times does ‘X’ appear in this row?), use the following formula:
The formula says: if in range E4 to H4 the value ‘X’ appears, count this and output the total.
However, upon entering this formula, I received an error prompt telling me:
The formula you typed contains an error.
For information about fixing common formula problems, click help.
To get assistance in entering a function, click Function Wizard (Formulas tab, Function Library group).
If you are not trying ot enter a formulam avoid using an equal sign (=) or minus sign (-) or precede it with a single quotation mark (‘).
So the COUNTIF function is not working? And this error message wasn’t all too helpful either. Luckily, I tried other notations and finally found an answer. I had to replace the comma (,) with a semicolon (;).
The COUNTIF formula now becomes a working one: