+ Reply to Thread
Results 1 to 26 of 26

Picking 5 highest/lowest numbers from a list

  1. #1
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Picking 5 highest/lowest numbers from a list

    Hello everyone,

    I just found this forum, and it looks like a great resource.

    I am trying to generate a list of the 5 highest and 5 lowest numbers from a list of scores that range from 1 to 10. I have found the highest and lowest absolute values (numbers over 7.5, and less than 5, out of 10), but I would also like to generate the 5 highest and lowest relative numbers, ie. if there are no scores over 7.5, then the 5 next highest numbers. I have used if/then formulas for the absolute highest and lowest numbers, and a rank/countif formula to rank them. I have no idea how to generate a list of the "relative strengths and weaknesses".

    Any help would be greatly appreciated. I have attached the file.

    Thanks,
    John
    Attached Files Attached Files
    Last edited by johnexceljohn; 07-23-2009 at 05:57 PM.

  2. #2
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Picking 5 highest/lowest numbers from a list

    are you looking for the
    =large
    and
    =small
    functions?

    You can designate a range, and the k highest or lowest value found in that range. IE 3rd highest number from a1:a100.

    Note:
    If you're doing this for multiple ascending values, use somethin like row() for your k value in the first row if it's in row 1, or row()-3 if it's in row 4 etc. This will let you drag the formula down, and the row() function will update per row to give you 1, 2, 3, 4, 5 etc. as it goes.
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Picking 5 highest/lowest numbers from a list

    Not sure if these are what you are looking for

    In H2:

    =IF(AND(MAX($B$2:$B$25)>5.04,MAX($B$2:$B$25)<7.45),IF(B2>=LARGE($B$2:$B$25,5),A2,"."),"")

    copied down

    and in I2:

    =IF(MIN($B$2:$B$25)>5.04,IF(B2<=SMALL($B$2:$B$25,5),A2,"."),"")

    copied down

    these will fill in only if all numbers in B2:B25 are out of the ranges.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    Thanks guys,

    I think the large function is working,I just need to figure out how to use the Row function

    @NVBC: I tried these but they didn't work for me.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Picking 5 highest/lowest numbers from a list

    Attached is how mine is meant to work...

    If all numbers in column B are less than 7.45 and greater than 5.04, then column H fills in...

    If all numbers in column B are greater than 5.04, then column I fills in....
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    @NBVC

    OK. this might take me a while to digest, my eyes are starting to go crosseyed with all the formulas. Will I have to somehow remove the scores that are higher or lower than the parameters that you set?

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Picking 5 highest/lowest numbers from a list

    Base on your original post:

    I would also like to generate the 5 highest and lowest relative numbers, ie. if there are no scores over 7.5, then the 5 next highest numbers.
    These columns only populate if all values in column B are outside the parameters that would populate column F & G

    I replaced some of your values in column B for testing.. all of the numbers in column B of my sheet are outside your 5.04 to 7.45 parameters.

  8. #8
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    ahh, I get it. What I'm looking for though is for it to include the absolute strengths in with the relative. for example, on the example sheet, there are exactly 5 absolute strengths, so the top 5 relative strengths should be the same ones. As for the relative weaknesses, there are 11 absolute, but it should pick out the lowest 5.

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Picking 5 highest/lowest numbers from a list

    So since you ranked them, you can use that column...

    In H2: =IF(C2<=5,A2,".")

    and in I2: =IF(C2>=LARGE($C$2:$C$25,5),A2,".")

    copied down.

  10. #10
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    YES!

    you did it. Thank you so much for the help, and not making me feel like a complete idiot. I knew I ranked them for a reason. Thank you so so much!

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Picking 5 highest/lowest numbers from a list

    You are welcome.

    You can also avoid column C, i guess and use these

    =IF(B2>=LARGE($B$2:$B$25,5),A2,".")

    and

    =IF(B2<=SMALL($B$2:$B$25,5),A2,".")

    Wasn't sure if you were ranking for other reason too.. that is why I used that column...

    Please remember to mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Last edited by NBVC; 07-17-2009 at 02:23 PM.

  12. #12
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    ohh that's even better. Thanks

  13. #13
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    Hmm, I just found a problem. Let's say I'm trying to find the 5 lowest relative numbers in the list, but the fifth and sixth numbers are the same. In this case, I would only like it to pick out the lowest 4, or to get even more complicated, I would like to find the lowest scores, up to 5, without including matching scores if the matching scores push the total over 5. for example, if the lowest score is 1, and the next 5 scores are 2, then I would only like it to show me the 1. Does that make sense?

    I have attached a sheet with this problem. So in the RDA column, I want it to disregard the 3 and 23, as they push the total over 5.

    Thanks in advance for the help!
    Attached Files Attached Files

  14. #14
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Picking 5 highest/lowest numbers from a list

    What if, out of the 5 smallerst, there are 2 or 3 similar scores and then the 5th score is different..

    e.g

    5.38
    5.60
    5.60
    5.60
    5.75

  15. #15
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    That would be fine. but, if there is a sixth number that is 5.75, becaust that pushes the total over 5, then I would just like to see:

    5.38
    5.6
    5.6
    5.6

    So duplicates aren't bad, but they are if they make the total exceed 5. So, as unlikely as it might be, if there were 6 lowest scores all tied, then I wouldn't use any of them.

  16. #16
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Picking 5 highest/lowest numbers from a list

    Try:

    Please Login or Register  to view this content.
    copied down.

  17. #17
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    Wow, that's a monster, but it sure works!

    Thank you so much!

  18. #18
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    Well, I found another loophole. In this new data set, with the new formula, it returns 1.33 (# 15) as the only RDA, when it should also grab the four # 4's, as that would still make a total of 5 RDA's. Make sense?

    So if there was one more score of 4 in the scores, then I wouldn't use any of them, but since there are only four, plus the lower score, they can be used.
    Attached Files Attached Files

  19. #19
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Picking 5 highest/lowest numbers from a list

    Maybe then?

    Please Login or Register  to view this content.

  20. #20
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    Yup, works. Well, I sure hope we have our bases covered now. Now for the 5 highest scores, I guess I can just go through this formula and change the smalls to large and direction signs and such...

    Thanks again, I never could have figured this out without you.

  21. #21
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    Here is what I put in for the relative strengths. Does it look sound?

    =IF(OR(B2<LARGE($B$2:$B$25,5),AND(B2=LARGE($B$2:$B$25,5),COUNTIF($B$2:$B$25,LARGE($B$2:$B$25,5))>1,OR(COUNTIF($B$2:$B$25,LARGE($B$2:$B$25,5))<4,COUNTIF($B$2:$B$25,LARGE($B$2:$B$25,5))=5))),".",A2)

    It works, but I'm not 100% comfortable manipulating such a big formula.
    Attached Files Attached Files
    Last edited by johnexceljohn; 07-21-2009 at 02:05 PM.

  22. #22
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    Dangit, now I have to change the absolute columns to reflect these changes. I guess they need to show absolute scores (values >=7.5, and <=5), to a maximum of 5.
    Attached Files Attached Files

  23. #23
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    Man, I'm really struggling with this. I'm trying to get it to return the top five scores over 7.5, up to a maximum of 5. My original formula is here, but it returns everything over 7.5, without limiting the amount of returns.I'm trying to have the same rules apply that we did for the "relative" columns, that if there are similar scores that push the total over 5, then to disregard them.

    Any Ideas?
    Attached Files Attached Files

  24. #24
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Picking 5 highest/lowest numbers from a list

    Try:

    Please Login or Register  to view this content.
    in B2,

    and

    Please Login or Register  to view this content.
    in C2 (i assumed 5.04 limit)

    Note: These formulas have to be each confirmed with CTRL+SHIFT+ENTER not just ENTER and then copied down.

  25. #25
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    These don't seem to be working for me. I wrote these formulas last night , and they seem to be working:

    For absolute strength:
    =IF(OR(AND(B2>=LARGE($B$2:$B$25,5),B2>7.45),AND(B2=LARGE($B$2:$B$25,5),COUNTIF($B$2:$B$25,AND(LARGE($B$2:$B$25,5),B2>7.45))>1,OR(COUNTIF($B$2:$B$25,AND(LARGE($B$2:$B$25,5),B2>7.45))<4,COUNTIF($B$2:$B$25,AND(LARGE($B$2:$B$25,5),B2>7.45))=5),B2>7.45)),A2,".")

    And for the weaknesses:
    =IF(OR(AND(B2<=SMALL($B$2:$B$25,5),B2<5.04),AND(B2=SMALL($B$2:$B$25,5),COUNTIF($B$2:$B$25,AND(SMALL($B$2:$B$25,5),B2<5.04))>1,OR(COUNTIF($B$2:$B$25,AND(SMALL($B$2:$B$25,5),B2<5.04))<4,COUNTIF($B$2:$B$25,AND(SMALL($B$2:$B$25,5),B2<5.04))=5),B2<5.04)),A2,".")

    They seem to cover all the bases. You think so?

  26. #26
    Registered User
    Join Date
    07-17-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Picking 5 highest/lowest numbers from a list

    Thanks again NBVC. This resource has been indispensable.

+ 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