How to count occurrences in Excel
Let’s assume you have a table with the sales for different products and you want to know how many occurrences of a certain product are present in the table. To do that you have to know how to perform a countif in Excel, a function that allows to count only certain values decided by the user. To do so proceed as follows.
Step 1 – Select the cell where to insert the function
– Select the cell by clicking on it or with the keyboard arrows.
Step 2 – Write the function
– Inside the selected cell write “=” to let the tool understand you want to insert a function;
– Start writing “COUNTIF” and the tool will suggest the COUNTIF function;
– Select the range where you have the list of items that the function will filter. In the example the range is the column where there are the product names, because the goal is to count only one product name occurrences. Press “F4” to block the cells, in this way you can copy the formula down the column avoiding to move the range.
– Select the criteria the function will follow to filter only the data you want to count. In the example we want to count only “Product A” so the criteria will be “Product A”.
– Close the parenthesis;
– Press enter to confirm the function.