+ Reply to Thread
Results 1 to 11 of 11

get most frequent number mode.mult give me same number

  1. #1
    Registered User
    Join Date
    01-24-2015
    Location
    Serbia, Kula
    MS-Off Ver
    2003
    Posts
    9

    get most frequent number mode.mult give me same number

    Hi guys I am having a bit struggle. I want to get a frequent numbers of my array. But problem is when use mode.mult it show me only one number..

    This is numbers

    1
    2
    3
    1
    2
    1
    3
    3
    3
    5
    1
    2
    3
    1
    1
    2
    2


    And when enter a mode.mult it show me array of ones (1). BUt I want all frequent numbers. can I somehow choose how many time is showed and use that as a data..For example if showed 3 or more times than with mode.mult show me that number..Or something like that.

    Idea is to get most frequent numbers of array of number.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,968

    Re: get most frequent number mode.mult give me same number

    Here's one way:

    =INDEX($A$1:$A$17,MODE(MATCH($A$1:$A$17,$A$1:$A$17,0)))

    This will give you the most frequently occurring number.

    If this isn't what you want, then show us your expected outcomes.
    Last edited by AliGW; 04-12-2017 at 12:06 PM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: get most frequent number mode.mult give me same number

    If I'm reading this correctly, you want the commonest number, the next commonest, etc. See the sheet.

    Commonest
    =MODE($A$1:$A$20)

    Next commonest:
    =MODE(IF($A$1:$A$20<>D2,$A$1:$A$20))
    entered as an array

    Next Commonest:
    =MODE(IF($A$1:$A$20<>D2,IF($A$1:$A$20<>E2,$A$1:$A$20)))
    entered as an array.

    And so on...

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    01-24-2015
    Location
    Serbia, Kula
    MS-Off Ver
    2003
    Posts
    9

    Re: get most frequent number mode.mult give me same number

    Thanks for reply. i am having a row with a couple thousand numbers. Which formula to use to find me for example 6 most common numbers?

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Thumbs up Re: get most frequent number mode.mult give me same number

    Hi,

    Glenn's solution is along the right lines, though obviously could result in some quite lengthy formulas should the number of desired returns be quite large. What's more, it will only return values which occur at least twice.

    I would prefer (again, assuming a range of A1:A20):

    In C1:

    =MODE.MULT(A1:A20)

    In C2, array formula**:

    =MODE(IF(COUNTIF(C$1:C1,A$1:A$20)={0,0},A$1:A$20))

    and copied down.

    Regards


    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Registered User
    Join Date
    01-24-2015
    Location
    Serbia, Kula
    MS-Off Ver
    2003
    Posts
    9

    Re: get most frequent number mode.mult give me same number

    So i got result
    1
    4
    6
    5
    2
    3
    7
    8
    9
    10

    Can I somehow tell that i want just 5 or 6...? Because I have a row with thousands of numbers. So result of C2 and copied down is infinite. Or can I just use first 6 and thats it?

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: get most frequent number mode.mult give me same number

    Why don't you just copy the formula to cover six cells?

    Regards

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: get most frequent number mode.mult give me same number

    Nice, one XOR LX. One Q though... What's the advantage of {0,0} over just plain old 0 ?

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: get most frequent number mode.mult give me same number

    Quote Originally Posted by Glenn Kennedy View Post
    Nice, one XOR LX. One Q though... What's the advantage of {0,0} over just plain old 0 ?
    It means that all entries will occur at least twice within the resulting 2-column array, hence ensuring that MODE does not error.

    Cheers

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: get most frequent number mode.mult give me same number

    Yep. i could see that excel was repeating the array when it evaluated the {0,0} bit. I wasn't clear why you wanted it to do that. Now I understand. However, it raises another Q in my head. Is it mathematically correct to return values that only occur once when looking for modes?? I suppose it depends on the intended purpose... thanks, anyhow.

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: get most frequent number mode.mult give me same number

    Quote Originally Posted by Glenn Kennedy View Post
    Is it mathematically correct to return values that only occur once when looking for modes??
    More philosophical than mathematical, I suppose. Though obviously Microsoft agreed with you, else they wouldn't have designed the MODE functions that way.

    Perhaps this particular case is not a very good example, though there are many cases in which it is necessary to manipulate the array returned from e.g. MODE.MULT in such a way that all entries are considered.

    Regards

+ 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. Replies: 2
    Last Post: 07-01-2015, 05:32 PM
  2. Frequent number for every category
    By Ankit_Kumar in forum Excel General
    Replies: 3
    Last Post: 04-27-2015, 06:15 AM
  3. Extracting most frequent number(s)?
    By figeroa in forum Excel General
    Replies: 4
    Last Post: 09-08-2014, 06:29 AM
  4. Check most frequent number in 1 column that has 4 digits number
    By Merson78 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-07-2014, 10:57 PM
  5. Replies: 0
    Last Post: 09-06-2012, 10:41 AM
  6. [SOLVED] Using Mode in Excel, need more than 1st most frequent number.
    By waterdancn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-12-2006, 06:40 PM
  7. [SOLVED] Minutes multiplied by a number to give a number
    By Mally in forum Excel General
    Replies: 4
    Last Post: 01-19-2005, 02:06 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