+ Reply to Thread
Results 1 to 7 of 7

Need A Formular To Sort And Show Frequency

  1. #1
    Registered User
    Join Date
    12-20-2004
    Posts
    88

    Need A Formular To Sort And Show Frequency

    Column A is a list of numbers that will be manually entered, processed, and replaced by new data repeatedly.
    I'd like to have column B represent the sorted list without multiples in desending order with NO BLANK ROWS and column C represent the frequency of occurrences for each value in A

    A...B...C
    5...3...2
    3...4...3
    4...5...1
    4
    3
    4

    Can this be done without manual operations?

    Help is appreciated.

    Travelersway
    Last edited by travelersway; 07-26-2005 at 10:13 AM.

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Yes, firstly number column D as a helper column, put a 1 in D1 and CTRL-Drag to following rows, this should sequential increase for each row.

    assuming data is in A1 to A999

    In B1 enter
    =SMALL(A$1:A$999,D1) with crtl/shift/enter to enter the array formula
    and formula drag this to the last line of data

    in C1 enter
    =" "&B2&" = "&COUNTIF(A$1:A$999,B1),"")
    in C2 enter
    =IF(B2<>B1," "&B2&" = "&COUNTIF(A$1:A$999,B2),"")
    and formula drag this to last line of data

    This produces the required counts, you can omit the " "&B2&" = "& if you just want numbers
    Last edited by Bryan Hessey; 07-25-2005 at 10:27 PM.

  3. #3
    Registered User
    Join Date
    12-20-2004
    Posts
    88
    Bryan, Thanks

    I was able to get column B to sort. I couldn't completely get column c to work. But, I dont think that is what I need.

    I edited my thread to note that column B should be the sorted list of column A with no multiples and no blank rows. Column C should be the associated frequency for column B.

    Any ideas?

    Thanks,
    Travelersway

  4. #4
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    329
    If you already have column B working, in column C just do a COUNTIF(A:A,B)



    Quote Originally Posted by travelersway
    Bryan, Thanks

    I was able to get column B to sort. I couldn't completely get column c to work. But, I dont think that is what I need.

    I edited my thread to note that column B should be the sorted list of column A with no multiples and no blank rows. Column C should be the associated frequency for column B.

    Any ideas?

    Thanks,
    Travelersway

  5. #5
    Registered User
    Join Date
    12-20-2004
    Posts
    88
    Thanks Morrigan,

    I have B Sorted, but not as I need. It's sorted with multiple entries.
    I need B to show one entry for each value in A with no blank rows between them and c to reflect the frequency of B in A.

    Thanks for your help. Any ideas?

    Travelersway

  6. #6
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    329
    Assume row 1 is your header, A2:A7 is the data

    B2 = SMALL(A$2:A$7,1+SUM(C$1:C1))
    C2 = COUNTIF(A$2:A$7,B2)

    Here is the catch, C1 can be blank but CANNOT be a number. I am using C1 as a helper cell otherwise the formula in B2 will be different from the formula in the rest of the cells in column B.


    Hope it helps.




    Quote Originally Posted by travelersway
    Thanks Morrigan,

    I have B Sorted, but not as I need. It's sorted with multiple entries.
    I need B to show one entry for each value in A with no blank rows between them and c to reflect the frequency of B in A.

    Thanks for your help. Any ideas?

    Travelersway

  7. #7
    Registered User
    Join Date
    12-20-2004
    Posts
    88
    MORRIGAN,

    Thank you for your help and staying with me ! Everything is working just the way it should if all the cells are used iin column B. This error message ( #NUM! ) comes up for the balance of the unused cells in column B after the sort of column A.

    Is there a way to remove it or make it hidden? The problem is that it appears on the form that I want to print

    Thanks again,
    Travelersway
    Last edited by travelersway; 07-27-2005 at 12:26 PM.

+ 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