+ Reply to Thread
Results 1 to 14 of 14

3 most common #'s

  1. #1
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    3 most common #'s

    Posted a message last week....And thought solution worked. But 2nd and 3rd most gives me errors.

    Posted an example.
    I want top 3 numbers from range in separate cells.
    Used: =SMALL(MODE.MULT(IF(F2:F38>=i15, A2:E38)), {1})
    (2} for second #
    {3} for 3rd #

    Some reason I get #num! error for 2nd and 3rd????
    Attached Files Attached Files
    Last edited by jackf-nc; 03-24-2016 at 12:28 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: 3 most common #'s

    MODE.MULT only returns multiple values if there are multiple values having equal counts, e.g., {1,1,2,2,3}\

    Row\Col
    I
    J
    1
    23-Mar
    I1: Input
    2
    46
    I2: =MODE(IF($F$2:$F$25 >= I1, $A$2:$E$25))
    3
    27
    I3: {=MODE(IF($F$2:$F$25 >= I1, IF(COUNTIF(I$2:I2, $A$2:$E$25)=0, $A$2:$E$25)))}
    4
    38
    5
    58
    6
    23
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: 3 most common #'s

    SHG,

    Could you please edit my example.? I am not able to reproduce your results. Also dont know what input for l1 should be....I assume its date from l15.
    Thank you my friend, I was hoping you would reply!!!!!!!!

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,428

    Re: 3 most common #'s

    I1=Date (23/03/2016)

    I2: =MODE(IF($F$2:$F$25 >= I1, $A$2:$E$25))

    I3: =MODE(IF($F$2:$F$25 >= I1, IF(COUNTIF(I$2:I2, $A$2:$E$25)=0, $A$2:$E$25)))

    Enter I3 with Ctrl+Shift+Enter

    Copy down column I to get 3rd, 4th etc.

    To validate:

    in K2: =COUNTIF($A$2:$E$23,I2)

    Copy down to get counts of results in I

  5. #5
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: 3 most common #'s

    John,

    I am trying to get most 5 common #'s from group. I used your original formula but it hiccups on #2. It always appears as 0. I have uploaded a revised example. Please tell me what I am doing wrong.
    Thanks,
    Jack
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,428

    Re: 3 most common #'s

    See attached. Range must be limited to that containing the data.

    Where there are many numbers with same frequency, they will "allocated" in the order in which they occur in the matrix .
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: 3 most common #'s

    Any way to avoid this? Maybe an if statement for a8:a500 - Currently there is not 500 records, just set it as that for future as data increases twice a week.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,428

    Re: 3 most common #'s

    Try

    Named Range "MyData" defined as

    =OFFSET(Sheet1!$A$8,,,COUNTA(Sheet1!$A8:$A500),5)

    Formulae

    B4

    =MODE(MyData)

    C4

    =MODE(IF(COUNTIF($B$4:B$4, MyData)=0, MyData,""))

    Enter C4 with Ctrl+shifT+Enter and copy across

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,428

    Re: 3 most common #'s

    ..... I moved data in row 4 to the right i.e. A4 is blank.

    Will still work if data is in A4:E4

  10. #10
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: 3 most common #'s

    Something isnt working correctly... Do you still have example? Man I really do appreciate your help! This has had me pulling hair out! Thanks again!

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,428

    Re: 3 most common #'s

    See attached ...
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: 3 most common #'s

    THANK YOU John!

    I had issue with the offset. I incorrectly set range. I have one last question. how can I dynamically sort those 5 cells from smallest to largest.

    Currently the five mode #'s are on one sheet. I want to have them sorted on another (5 cells) sheet. Any ideas?

  13. #13
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,428

    Re: 3 most common #'s

    Assume values are in Sheet1!A1:A5

    then in your second sheet say C1:G1

    in C1

    =Large(Sheet1!A1:A5,5) smallest

    in G1

    =Large(Sheet1!A1:A5,1) largest

    D1, E1 and F1 will be 4, 3 and 2

  14. #14
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: 3 most common #'s

    Thank you!!!Works great! I learned something new!

+ 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. Return most common, 2nd common...within the data range
    By tantcu in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-07-2015, 06:06 PM
  2. [SOLVED] Common button
    By oglcngcmn in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-10-2015, 06:01 PM
  3. Replies: 1
    Last Post: 09-26-2014, 04:47 PM
  4. Need help with sorting a column by most common to least common
    By mikenmike0001 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-06-2011, 04:28 PM
  5. 2nd most common value
    By navigator25 in forum Excel General
    Replies: 4
    Last Post: 01-23-2009, 08:47 AM
  6. Finding the most common (and 2nd, 3rd most common) text
    By sprite_green in forum Excel General
    Replies: 2
    Last Post: 11-23-2006, 11:56 AM
  7. [SOLVED] Common Private Sub
    By Booker in forum Excel General
    Replies: 1
    Last Post: 11-15-2005, 04:55 AM

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