+ Reply to Thread
Results 1 to 24 of 24

Top 5 numbers in a range

  1. #1
    Registered User
    Join Date
    11-05-2014
    Location
    GREECE
    MS-Off Ver
    2007
    Posts
    23

    Top 5 numbers in a range

    i have being trying for 2 days with this problem, i have a table with numbers and i want to find the top 5 numbers that have appeared in range A4:G91
    alla array formulas that i have used didnt work
    pls help my mind is burned!!!!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: Top 5 numbers in a range

    Put this in I6:

    =LARGE($A$4:$E$91,H6)

    then copy down to I10. It will give you all 45s, as your top-5 numbers are 45.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    11-05-2014
    Location
    GREECE
    MS-Off Ver
    2007
    Posts
    23

    Re: Top 5 numbers in a range

    no i want the top 5 number that have appeared in the range .

  4. #4
    Registered User
    Join Date
    11-05-2014
    Location
    South Africa
    MS-Off Ver
    2010
    Posts
    4

    Re: Top 5 numbers in a range

    largest number =LARGE(A4:E91,1)
    second largest number =LARGE(A4:E91,2)
    third largets largest number =LARGE(A4:E91,3)
    etc


    hope this helps

  5. #5
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Top 5 numbers in a range

    There you go
    Attached Files Attached Files

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Top 5 numbers in a range

    In I6:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In I7, enter as array formula (ctrl-shift-enter):
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and copy down through I10.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  7. #7
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Top 5 numbers in a range

    Quote Originally Posted by henco8 View Post
    largest number =LARGE(A4:E91,1)
    second largest number =LARGE(A4:E91,2)
    third largets largest number =LARGE(A4:E91,3)
    etc


    hope this helps
    Doesn't work with multiple identical values! The largerst number is 45, and there are several 45's in the array, so you will get all 5 results as 45, checked it

  8. #8
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Top 5 numbers in a range

    Quote Originally Posted by bmouse View Post
    There you go
    Whilst that gives the answer, it doesn't help anyone learn HOW to get the answer.

  9. #9
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Top 5 numbers in a range

    Hi, ref the attachment, Multiple cons ranges used, made values as row lables and thats provide the answer
    Attached Files Attached Files
    Click just below left if it helps, Boo?ath?

  10. #10
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Top 5 numbers in a range

    Quote Originally Posted by Olly View Post
    Whilst that gives the answer, it doesn't help anyone learn HOW to get the answer.
    I used the MAX formula to determine the maximal value in each row.
    I used Sort and sorted the numbers vertically from largest to smallest.
    I used Remove Duplicates to remove duplicate values of the same number.

    Hope that helps

  11. #11
    Registered User
    Join Date
    11-05-2014
    Location
    GREECE
    MS-Off Ver
    2007
    Posts
    23

    Re: Top 5 numbers in a range

    i dont think you understand me .
    in the range A4:E91 i want the top 5 numbers that appear the most.
    for example the most common number is 13 with 25 apearances, the second most common number is 33 etc.

  12. #12
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Top 5 numbers in a range

    Quote Originally Posted by bmouse View Post
    I used the MAX formula to determine the maximal value in each row.
    I used Sort and sorted the numbers vertically from largest to smallest.
    I used Remove Duplicates to remove duplicate values of the same number.

    Hope that helps
    Your method is flawed.

    Imagine you had a row containing 60, 59, 58, 57 and 56.

    They would be the top 5 numbers of the overall array. Your method would include 60, but would exclude 59, 58, 57 and 56.

  13. #13
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Top 5 numbers in a range

    Quote Originally Posted by Olly View Post
    Your method is flawed.

    Imagine you had a row containing 60, 59, 58, 57 and 56.

    They would be the top 5 numbers of the overall array. Your method would include 60, but would exclude 59, 58, 57 and 56.
    Touche! Oh, well, back to the drawing board and thanks for pointing that out

  14. #14
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Top 5 numbers in a range

    Quote Originally Posted by stavroseco View Post
    i dont think you understand me .
    in the range A4:E91 i want the top 5 numbers that appear the most.
    for example the most common number is 13 with 25 apearances, the second most common number is 33 etc.

    So you want the MODE (most frequent) numbers, not the top (maximum) values?

    In I6:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In I7, enter as array formula (ctrl-shift-enter):
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and copy down through I10.


    Edit: Although your suggestion that 13 is the most common number with 25 appearances doesn't match your dataset...
    Last edited by Olly; 11-05-2014 at 07:29 AM.

  15. #15
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Top 5 numbers in a range

    I think I got it right this time, not an advanced solution though
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    11-05-2014
    Location
    GREECE
    MS-Off Ver
    2007
    Posts
    23

    Re: Top 5 numbers in a range

    Quote Originally Posted by Olly View Post
    So you want the MODE (most frequent) numbers, not the top (maximum) values?

    In I6:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In I7, enter as array formula (ctrl-shift-enter):
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and copy down through I10.


    Edit: Although your suggestion that 13 is the most common number with 25 appearances doesn't match your dataset...
    my suggestion of 13 was just an example not the real deal.
    Now I6 worked!
    I7 the array formula didnt work , excel said that "the formula contains an error"
    maybe i am doing something wrong????

  17. #17
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Top 5 numbers in a range

    Quote Originally Posted by stavroseco View Post
    my suggestion of 13 was just an example not the real deal.
    Bad idea. If you're going to quote numbers as an example of what you want, make them accurate...


    Quote Originally Posted by stavroseco View Post
    Now I6 worked!
    I7 the array formula didnt work , excel said that "the formula contains an error"
    maybe i am doing something wrong????
    Do you use , or ; as your formula argument separator, in Greece?

  18. #18
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Top 5 numbers in a range

    Hi, Ref the attachment
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    11-05-2014
    Location
    GREECE
    MS-Off Ver
    2007
    Posts
    23

    Re: Top 5 numbers in a range

    i think is the same. i use English version of excel

  20. #20
    Registered User
    Join Date
    11-05-2014
    Location
    GREECE
    MS-Off Ver
    2007
    Posts
    23

    Re: Top 5 numbers in a range

    **** it worked with the ; separator !!!

  21. #21
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Top 5 numbers in a range

    Quote Originally Posted by stavroseco View Post
    **** it worked with the ; separator !!!
    Great. So that does what you want now?

  22. #22
    Registered User
    Join Date
    11-05-2014
    Location
    GREECE
    MS-Off Ver
    2007
    Posts
    23

    Re: Top 5 numbers in a range

    two days i strangled and the error was the ; instead of a , !!!

  23. #23
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Top 5 numbers in a range

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. You can also Add Reputation to helpful posts. Thanks.

  24. #24
    Registered User
    Join Date
    11-05-2014
    Location
    GREECE
    MS-Off Ver
    2007
    Posts
    23

    Re: Top 5 numbers in a range

    thank you very much all!!!!!!!

+ 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. Finding TWO numbers from a range of numbers to match a target value
    By Eero in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-18-2014, 10:08 AM
  2. Create range of numbers on one row from incrementing numbers on multiple rows
    By mexykanu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2014, 04:40 PM
  3. Replies: 7
    Last Post: 02-27-2014, 10:56 PM
  4. [SOLVED] Convert numbers stored as text to numbers for range of data that changes
    By excel2425 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-06-2014, 01:57 PM
  5. [SOLVED] Count comma separated numbers, numbers in a range with dash, not t
    By Mahendra in forum Excel General
    Replies: 0
    Last Post: 08-08-2005, 01:05 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