+ Reply to Thread
Results 1 to 9 of 9

Ranking Spreadsheet (multi variable Hlookup)

  1. #1
    Registered User
    Join Date
    12-08-2008
    Location
    NYC
    MS-Off Ver
    2003 & XP
    Posts
    43

    Ranking Spreadsheet (multi variable Hlookup)

    i have this spreadsheet for a football pool. The place is determined as follows:

    1. The most amount of wins
    2. if two or more people tie the # of wins then the person with the lowest tiebreaker guess wins and the other person becomes the next place.
    3. If two people tie the number of wins and the tiebreaker for say 1st place the next highest win and lowest tiebreaker should place 3rd since there are two people above him.

    Attached is a spreadsheet of the problem. The solution must only use the info in the "Given" section. You may reorder the data (rows moving up or down, not columns). Solution required is in Yellow.

    I could figure out the logic IF there is a way to do a multi conditional hlookup. So if you know of a way to use an "And" in the condition and pull up one row as a result, i can probably figure out the rest.

    TIA

    My guess is if it can be done the solution will be provided by DaddyLongLegs or Shg, but answers from any are welcome!!!!!!
    Attached Files Attached Files
    Last edited by coinbank; 01-05-2009 at 10:19 AM. Reason: specify Title

  2. #2
    Forum Contributor
    Join Date
    08-21-2006
    Location
    Ossett, West Yorkshire
    MS-Off Ver
    2003
    Posts
    150

    Smile

    Hi,
    I don't know if I have followed all your conditions but the attachment supplies a solution
    Regards Howard
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-30-2008
    Location
    Vermont, USA
    MS-Off Ver
    Excel 2003
    Posts
    64

    re: ranking spreadsheet

    Attached is a simple solution (the parts I added are in yellow)-- the sheet is called 'fixed rank'. Also, note that I artificially created a true tie between Josh and Jessica for first place by changing Josh's tie-breaker score to match Jessica's (just did this for testing).

    Let me know if there's anything you don't understand or if it's not working as expected. Be careful to edit the formulas if you're going to extend the number of contestants past Column V!
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    You can do this without adding any helpers etc...

    Firstly you should alter your formulae for B13:B22 as presently these are not correct

    B13: =LARGE($C$7:$V$7,COUNTIF($C$7:$V$7,"<="&N(B12))+1)
    copy down

    Next formula to enter is for Pts -- enter as follows:

    E28: =LARGE($C$7:$V$7+(($C$8:$V$8)/10000000),$A28)
    Note this is an array so you MUST commit this using CTRL + SHIFT + ENTER
    Once the array is set the formula will be encased within { }
    Once set copy E28 down for E29:E37
    (ensure E28:E37 is formatted to 2 decimals)

    Next formula to enter is for NAME -- enter as follows:
    C28: =INDEX($A$9:$V$9,1,MAX(IF($C$7:$V$7+(($C$8:$V$8)/10000000)=$E28,COLUMN($C$7:$V$7))))
    Again this is an array and so must be committed using CTRL + SHIFT + ENTER

    Next formula to enter is for TieBreaker -- enter as follows:
    D28:=INDEX($A$8:$V$8,1,MAX(IF($C$7:$V$7+(($C$8:$V$8)/10000000)=$E28,COLUMN($C$7:$V$7))))
    Again this is an array and so must be committed using CTRL + SHIFT + ENTER

    You could avoid using the array's if you're prepared to have a helper cell -- this would hold a unique ranking based on the above approach ie add the tiebreak amount / 10,000,000 to the Win -- this would in turn give each person a totally unique value which you can then use within a SMALL / LARGE approach... assuming of course the TIEBREAK is always unique where WinPts are the same -- this I'm assuming to be the case.
    Last edited by DonkeyOte; 01-01-2009 at 08:51 AM.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    In truth I should have added that I regarded B13:B22 as incorrect given the fact that you were counting occurrences of the score in C I in turn presumed that B should be returning the top 10 unique Wins score... in hindsight I think I've misinterpreted so apologies.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    In addition I have just proved myself to be a complete imbecile as I was working on the assumption that the higher tie break score was better which is categorically not the case so my last post but one is entire garbage.

    A great start to 2009 :-)

    Revised formulae based on the fact that LOWER tie break is BETTER...

    E28: =LARGE($C$7:$V$7+((1000-($C$8:$V$8))/10000000),$A28)
    Commit with CTRL + SHIFT + ENTER and then apply to E29:E37

    C28: =INDEX($A$9:$V$9,1,MAX(IF($C$7:$V$7+(((1000-$C$8:$V$8))/10000000)=$E28,COLUMN($C$7:$V$7))))
    Commit with CTRL + SHIFT + ENTER and then apply to C29:C37

    D28: =INDEX($A$8:$V$8,1,MAX(IF($C$7:$V$7+(((1000-$C$8:$V$8))/10000000)=$E28,COLUMN($C$7:$V$7))))
    Commit with CTRL + SHIFT + ENTER and then apply to D29:D37

    In essence the same as before but only now when adding the tie break score to the Win Pts we subtract it from 1000 prior to dividing by 10,000,000
    End result: the lower the tie break score the greater the increment and thus the higher the resulting value making it easy to use with LARGE.
    (note assumes tie break score is always >= 0 and <= 999 -- if the score sits outside of those boundaries the above will need adjusting)
    Last edited by DonkeyOte; 01-01-2009 at 09:28 AM.

  7. #7
    Registered User
    Join Date
    12-08-2008
    Location
    NYC
    MS-Off Ver
    2003 & XP
    Posts
    43
    thanks for all of your help but i a gathering from the all of the "complex" answers that there is no way to do a multiconditional vlookup?

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    If you mean

    "Can I use classic VLOOKUP function with multiple conditions"

    Answer is No
    (not withstanding the possibility that you create a Concatenation key)

    If on the other hand you mean:

    "Can I replicate the functionality* of a VLOOKUP using multiple conditions ?"
    (*ie return value from table)

    Answer is Yes -- see the solutions provided.

  9. #9
    Registered User
    Join Date
    12-08-2008
    Location
    NYC
    MS-Off Ver
    2003 & XP
    Posts
    43
    Quote Originally Posted by DonkeyOte View Post
    If you mean

    "Can I use classic VLOOKUP function with multiple conditions"

    Answer is No
    (not withstanding the possibility that you create a Concatenation key)

    If on the other hand you mean:

    "Can I replicate the functionality* of a VLOOKUP using multiple conditions ?"
    (*ie return value from table)

    Answer is Yes -- see the solutions provided.
    Thanks man, thats what i thought but wanted to make sure i didn't overlook the obvious

+ 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