Count of Each Item in a List/Single Column
With the aid of Advanced Filter and the COUNTIF we can get a count of each item that appears in a list. Let's say the list currently resides in A1:A100, with A1 being a heading and many items appearing more than once. We first need to create ourselves a list which has only one occurrence of each item.
Create a Unique Item List
1) Select A1:A100 and then go to Data>Filter>Advanced Filter
2) Ensure "Action" is set to Copy list to another location
3) "List Range" is $A$1:$A$100 and "Criteria Range" is blank.
4) "Copy to" is $F$1 (or any single cell in row 1).
5) Check the "Unique records only" checkbox and then click "Ok".
Now, Starting from F1 (or the cell you chose), you have a list containing only one occurrence of each item in the list.
Enter the COUNTIF Formula
Now we have the unique list, we can now count how many times each item appears in our original list in A1:A100. So in F2 (F1 is a heading and can read "Count") enter the COUNTIF Formula as shown below
=COUNTIF($A$2:$A$100,$F2)
Now click the Fill Handle of F2 while it's selected, or copy down manually. Note the use of the absolute range $A$2:$A$100 and the absolute column and relative row of $F2.
See also: Index to Excel VBA Code and Index to Excel Freebies and Lesson 1 - Excel Fundamentals and Index to how to… providing a range of solutions and Index to new resources and reference sheets
See also:
Count Between Date Ranges |
Excel Count If With Multiple Criteria |
Examples & Usage Of Excel CountIf Function |
Examples & Usage Of Excel Counting Functions |
Count Lines in a Cell |
Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.
Microsoft ® and Microsoft Excel ® are registered trademarks of Microsoft Corporation. OzGrid is in no way associated with Microsoft.