title: Extracting unique values from a list and sorting by occurrence in Excel
body: <p>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?</p>
  
  <pre><code>    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
  </code></pre>
  
  <p>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. </p>