+ Reply to Thread
Results 1 to 12 of 12

Creating a Scoresheet

  1. #1
    Registered User
    Join Date
    01-13-2009
    Location
    California
    MS-Off Ver
    Excel 2004
    Posts
    13

    Creating a Scoresheet

    Should be an easy fix for experts, but I'm not one of those...

    I'm trying to create a "scoresheet" in Excel where a racer has a name and an ID number on the main tally worksheet, with columns relating to their scores for each race. Subsequent worksheets have results from each race (one race per sheet), with the individual referenced by their ID number.

    How do I have the main tally sheet "find" that person's score for each event in separate columns so that it can add up their totals? I tried an IF formula to find each score in the subsequent sheets, but that didn't work.

    Is there a simple formula to do this? I've been achieving the results by importing the worksheets into a Filemaker database (where the ID number "matches" and updates each score), but that's a pain, and I'd rather do it all in Excel.

    Thanks,

    Mark

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Creating a Scoresheet

    This is doable. Go ahead and post up your workbook, we'll help you sort it out.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    10-11-2007
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    251

    Re: Creating a Scoresheet

    See workbook attached
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-13-2009
    Location
    California
    MS-Off Ver
    Excel 2004
    Posts
    13

    Re: Creating a Scoresheet

    Thanks Steve and JBeaucaire,

    I think I've basically got it now. Just two more essentials to fix and I think it will work perfectly:

    The formula I have for each race result is:
    =VLOOKUP($D3,Race1!$B$1:$C$61,2,FALSE)

    1) If a race doesn't have someone's particular ID number, it returns the cell with a "#N/A." I need it to return me a "0" (a zero) number. Otherwise, the subsequent calculations all give me a #N/A.

    2) I need to find the two LOWEST scores and subtract those from the subtotal. I know how to find the single lowest score (=MIN(E3:J3)), but how do I find the SECOND lowest score in the row so I can subtract that as well?

    Thanks so much! This really helps me out a lot. My attempt is attached.

    Mark
    Attached Files Attached Files

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

    Re: Creating a Scoresheet

    Try the attached.... I made some changes such that the Race columns use a common formula as do the Min columns... re: the Min values I made the assumption that 0 values were to be ignored.

    I hope it helps.
    Attached Files Attached Files
    Last edited by DonkeyOte; 02-07-2009 at 03:50 PM.

  6. #6
    Registered User
    Join Date
    01-13-2009
    Location
    California
    MS-Off Ver
    Excel 2004
    Posts
    13

    Re: Creating a Scoresheet

    DonkeyOte,

    Thanks so much for these. Only one problem is that the assumption you made isn't quite correct -- we actually have to NOT ignore any 0's in finding the minimum values. Basically, the athlete is allowed to "drop" two races, whether they do poorly or they miss because of illness, etc. If they miss a race, they get a zero, so they are allowed to drop that and it becomes one of the minimums. So we would have to adjust that formula.

    Secondly, the formula you gave for the lookup is really complex to me, so, as always with these things, it would be great (if you didn't mind) if you could give me a quick overview English explanation as to what it's doing. That always helps me when I try to figure things out on my own. The original formula for the lookup from SteveR made some sense to me (as a non-expert) but the one in your sheet was way beyond my capability to understand it.

    =VLOOKUP($D3,Race1!$B$1:$C$150,2,FALSE)
    vs.
    =LOOKUP(9.999999999999E+307,CHOOSE({1,2},0,VLOOKUP($D3,INDIRECT("'"&E$2&"'!$B$1:$C$150"),2,FALSE)))

  7. #7
    Registered User
    Join Date
    01-13-2009
    Location
    California
    MS-Off Ver
    Excel 2004
    Posts
    13

    Re: Creating a Scoresheet

    Or maybe an English explanation for this stuff is irrelevant, as I'll never completely understand it anyway

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

    Re: Creating a Scoresheet

    Quote Originally Posted by imnxcguy View Post
    Only one problem is that the assumption you made isn't quite correct -- we actually have to NOT ignore any 0's in finding the minimum values. Basically, the athlete is allowed to "drop" two races, whether they do poorly or they miss because of illness, etc. If they miss a race, they get a zero, so they are allowed to drop that and it becomes one of the minimums. So we would have to adjust that formula.
    What happens if they have 2 missed races are both 0's acceptable values ? The above implies only 1 is used but need to be clear.

    Assuming all values E:J are valid then alter:

    Please Login or Register  to view this content.
    Re: explanation

    The INDIRECT approach is just done to allow you to have one common VLOOKUP formula for each Race... given the only thing that changes between columns is the sheet on which the lookup range resides and given said sheet name resides in row 2 you can use INDIRECT to build a "dynamic" sheet reference.

    The LOOKUP with BIGNUM will return the last numerical number in the resulting vector, the CHOOSE approach is used to return a 0 to the vector and the result of the VLOOKUP. Should the VLOOKUP return an Error this will be ignored by the LOOKUP so it will return 0, were the result of the VLOOKUP value it would return that number.

    A more common approach that you would see would be:

    Please Login or Register  to view this content.
    I prefer the LOOKUP method myself as you are not required to do any "double evaluation" ... ie in the above you are essentially looking up D3 twice (once in the MATCH to test for it's existence in the VLOOKUP range) and again in the actual VLOOKUP if indeed it does exist... the LOOKUP method avoids that requirement.

    The LOOKUP approach employed here works because the VLOOKUP result is always numeric... were you returning text you would change the LOOKUP to a big text value rather than BIGNUM, ie REPT("z",255) and instead of 0 the CHOOSE would return a null ("") such that your formula returned either a null value (if VLOOKUP error) or the text result of the VLOOKUP were it successful.

    I hope that helps.
    Last edited by DonkeyOte; 02-08-2009 at 04:14 AM.

  9. #9
    Registered User
    Join Date
    01-13-2009
    Location
    California
    MS-Off Ver
    Excel 2004
    Posts
    13

    Re: Creating a Scoresheet

    Thanks for the info? I will try to digest all of that. To answer the specific question:
    The athletes (in this case) are allowed to drop 2 races out of the 6. Whether they score poorly or don't show up doesn't matter, so yes, if there are two zero's, they are allowed to drop both zeros.

    Thanks!

    Mark

  10. #10
    Registered User
    Join Date
    01-13-2009
    Location
    California
    MS-Off Ver
    Excel 2004
    Posts
    13

    Re: Creating a Scoresheet

    OK, now I'm confused as to which you think is the better formula to use. It's starting to look all Greek to me!

    =LOOKUP(9.999999999999E+307,CHOOSE({1,2},0,VLOOKUP($D3,INDIRECT("'"&E$2&"'!$B$1:$C$150"),2,FALSE)))

    or

    =IF(ISNA(MATCH($D3,INDIRECT("'"&E$2&"'!B1:B150"),0)),0,VLOOKUP($D3,INDIRECT("'"&E$2&"'!B1:C150"),2,FALSE))

    You say that you prefer the "lookup" method, but to me they both look like they are doing a "lookup." Remember, I have no idea how these formulas work -- it's like magic.

    Thanks,

    Mark

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

    Re: Creating a Scoresheet

    Use the first one...

  12. #12
    Registered User
    Join Date
    01-13-2009
    Location
    California
    MS-Off Ver
    Excel 2004
    Posts
    13

    Re: Creating a Scoresheet

    Thanks very much. That seems to work great. I have no idea how, of course, but for now, it's all good.

    Mark

+ 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