The Klipfolio COUNTIF function tests each value in a condition, counts the true results, and returns the count as a single value.
The syntax for the COUNTIF function is:
COUNTIF( condition )
Let's look at a COUNTIF function example.
The following example is based on the above text from an Excel spreadsheet:
COUNTIF ( A:A = "Peaches" ) returns 1
To enter an expression within a COUNTIF:
- After you select the COUNTIF function, click condition inside the COUNTIF function, then click column A in the data source.
- Wrap parenthesis around A:A by clicking ( ) (2nd button to the right of Wrap) to wrap the current value in parenthesis. The expression will look like COUNTIF( ( A:A ... ) ).
- Click the ellipsis to the right of A:A and select =.
- Click the ellipsis to the right of = and click the Insert literal string button (2nd button from left) and type Peaches.