1

Is there a formula to extract all unique terms in a list in Excel, then sort them by the number of times they occurred in the list?

    List    Extracted Data
1   AA       AA
2   BB       CC
3   CC       BB
4   AA       EE
5   DD       DD
6   EE
7   AA
8   CC
9   CC
10  EE
11  BB
12  AA

AA occurs 4 times, so it is placed at the top of the extracted list, followed by CC which occurred 3 times, and so on.

2 Answers 2

3

I think that the faster way is by using pivot tables:

  1. Select the table (make sure there's a header; insert one if there aren't any) and go to "Insert" > "Pivot Table". You should get something like this: enter image description here

  2. Click 'OK' then drag the header from the right pane once into "Row labels" and a second time into "Values": enter image description here

  3. Now select column B and insert a filter through "Home" > "Sort&Filter": enter image description here

  4. Now, just sort by descending: enter image description here

2
  • Hmm the problem is that my table doesn't only contain those values, but multiple other values, so I cannot group similar "AA"s together.
    – Quorrin
    Sep 14, 2013 at 15:31
  • @user1708205 Would be great if you could provide a snapshot of your table. But if you have other columns, you can add filters on other columns if you have more (drag drop to "Report filter" and filter on only those you need).
    – Jerry
    Sep 14, 2013 at 15:35
1

First use Advanced Filter to extract the unique records to column B. Then in C1 enter:

=COUNTIF(A$1:A$12,B1) and copy down

Finally sort cols B & C by C Descending

1
  • What I wish to avoid is a sheet with a lot of irrelevant data, so it'll be great if I can settle everything with one step
    – Quorrin
    Sep 14, 2013 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.