+ Reply to Thread
Results 1 to 3 of 3

Sort a row by the frequency of the numbers

  1. #1
    Registered User
    Join Date
    05-18-2012
    Location
    Norwalk, CT
    MS-Off Ver
    Excel 2010
    Posts
    80

    Sort a row by the frequency of the numbers

    Range("A1:A8") contains numbers:
    1
    2
    5
    5
    5
    5
    2
    2

    I need some VBA to sort it as: (From the most frequent number to the least frequent)

    5
    5
    5
    5
    2
    2
    2
    1

  2. #2
    Forum Contributor wakeupcall's Avatar
    Join Date
    02-29-2012
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: Sort a row by the frequency of the numbers

    Hi,

    you can enter Mode formula (=MODE(A1:A8) in a random cell - let's say C1.

    Then the code will look like that

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-18-2012
    Location
    Norwalk, CT
    MS-Off Ver
    Excel 2010
    Posts
    80

    Re: Sort a row by the frequency of the numbers

    Thx for the quick reply.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1