Pivot table or countif function???
Clever Excel formulas November 29th, 2007
If we have a list of student names and we want to calculate the frequency of each name then we can use a countif function to obtain this. However the disadvantage of countif function is we first need to make a table with no repetition of names and only then we can apply countif.
The main advantage of using pivot table instead of countif function is, it will create a table itself and we don’t need to worry about it.
Moreover to make a pivot table, it is not necessary that we have two categorical variables. Even if we have one variable like “names” then we can drag “names” to the rows and “count of names” to the data region. So against each name it will give us the frequency.
Below is the step by step procedure:
Choose the “Pivot Table and PivotChart Report” from the “Data” drop down menu and click “Next”.
Select the range and then click “Next” tab.
Then click “Layout” tab and drag the variable and click “Ok”as shown in the diagram below.
So you have got exactly the same table as above using countif function but the best part is you did not manually enter the names.
Share ThisPopularity: 17%

Or put a header in B1 and this formula in B2 copied down to B24:
=if(countif($A$2:A2,A2)=1,countif($A$2:$A$24,A2),”")
then sort by col B.
Good tutorial on Pivot Tables though!