» Sorting Numbers Based on Their Frequency within a List
CATEGORY - Excel Formula and Function
VERSION - All Microsoft Excel Versions
Problem: We want to create a list in column B that consists of each unique value from List1 (column A).
The values are to be sorted in descending order according to their frequency of occurrence in List1 (i.e. the most frequent number in List1 will appear first, followed by the second most frequent number, and so on).
Solution:
Enter the MODE function as shown in the following formula (in cell B2):
=MODE(A2:A15)
Then, use the MODE, IF, and COUNTIF functions as shown in the following Array formula in cell B3 and copy it down the column until the #N/A error is returned:
{=MODE(IF(COUNTIF($B$2:B2,$A$2:$A$15)=0,$A$2:$A$15))}
Book Store:
Recommended Books:
- What the IRS Doesn't Want You to Know: A Cpa Reveals the Tricks of the Trade
- Microsoft Windows XP Inside Out
- Treason: Liberal Treachery from the Cold War to the War on Terrorism
- PowerPoint® 2002 For Dummies®
- East of Eden (Oprah's Book Club)
- Financial Statements: A Step-By-Step Guide to Understanding and Creating Financial Reports
No comments have been submitted.

