+ Reply to Thread
Results 1 to 3 of 3

List numbers by order of frequency?

  1. #1
    Registered User
    Join Date
    09-24-2008
    Location
    Illinois
    Posts
    3

    List numbers by order of frequency?

    I have an section of numbers (5x5) that has several repeating numbers. I have another section of the same size in which I'd like to store those same numbers, in order of frequency (most frequent first).

    Source:

    4 6 9 3 2
    7 3 2 5 6
    0 1 9 8 4
    4 7 1 5 9
    2 5 4 8 6

    Target:

    4 6 9 2 5
    3 7 1 8 0
    - - - - -
    - - - - -
    - - - - -

    The numbers would be of an arbitrary range, not just 0-9. The order of same-frequency numbers can be by either value or order of appearance. The target section must be filled row by row, from left to right.

    Anybody know how I might accomplish this?

  2. #2
    Valued Forum Contributor
    Join Date
    04-11-2006
    Posts
    407

    I took a stab at this one...

    So here's as close as I was able to get so far... Maybe it's close enough for you? Or maybe it puts you on the right path to solving it completely... Or maybe someone comes along and has something so much more simple. In any case, attached is my effort. I hope it is helpful to you.
    Attached Files Attached Files

  3. #3
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Just for the heck of it, here's a macro that does it. This was built in Excel 2007, which uses a different sort method than previous versions. Un-comment the sort code for the version of Excel you're using before running the macro!

    The code uses I1:J25 to store the values and frequencies during the macro, then clears that area once done processing. It also assumes your 25 values are in A2:E6. It may or may not work for you, but I had some spare time anyway.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Removing Hyphens From A List of Numbers
    By grayfox in forum Excel General
    Replies: 5
    Last Post: 03-25-2008, 10:35 PM
  2. Do Not Call List Spreadsheet
    By cbahman in forum Excel General
    Replies: 2
    Last Post: 11-08-2007, 02:14 AM
  3. way to sum numbers down the list accroding to a value in a cell
    By Richard Flame in forum Excel General
    Replies: 3
    Last Post: 06-06-2007, 05:32 PM
  4. Stock list macro
    By c0ldpl4ya in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-15-2007, 10:09 AM
  5. ADVANCED: Extracting unique records
    By UKNOWN in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-05-2007, 06:12 PM

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