+ Reply to Thread
Results 1 to 14 of 14

Plug-in scores to a results sheet

  1. #1
    Registered User
    Join Date
    07-25-2004
    Posts
    24

    Plug-in scores to a results sheet

    I have two spreadsheets. One is a listing of football scores from the previous week. The other is the schedule for that week. I would like to be able to populate one from the other.

    Even if someone could point me in the direction of which functions to use that would be helpful.

    Based on the data in the results spreadsheet in columns M, N and P ... I need to look in the scores spreadsheet and compare to columns A, F, H and I. I would need to retrieve columns G and J for their scores.

    I've been looking at SEARCH, LEFT AND VLOOKUP so far!

    Thanks in advance.
    Attached Images Attached Images

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Plug-in scores to a results sheet

    Can you upload example workbook with dummy data?

  3. #3
    Registered User
    Join Date
    07-25-2004
    Posts
    24

    Re: Plug-in scores to a results sheet

    Sure can. I'm trying to populate the results tab with the weekly scores data.
    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

    Re: Plug-in scores to a results sheet

    I've just had a quick look at this and I confess I can't entirely fathom what's happening... for ex. if we filter the weekly_scores sheet such that we're looking only at QK as home side (Col A) and then try and tie that back to the AT: QK section on the results...

    It would "appear" that the number suffix post side (eg QK1, QK4) should match the number suffix post # sign on weekly scores sheet (Cols F & I), correct ?

    However, if you look at the results summary for AT: QK and compare to weekly_scores data we find the sides don't actually tie out.

    For ex. in row 21 you have a result between QK2 and LA2 ... LA are not listed as away assoc on your scores sheet ?

    I would in fact have expected this line:

    Please Login or Register  to view this content.
    to read

    Please Login or Register  to view this content.
    given the flag number is #1 for both sides and the opponent is seemingly PA not LA.

    Can you provide any further insights as to how this works ?
    (ie am I right and this is an error in your results sheet or am I misreading how this is meant to work ?)

  5. #5
    Registered User
    Join Date
    07-25-2004
    Posts
    24

    Re: Plug-in scores to a results sheet

    Since I code the PHP application that is capturing this data I can make sure the naming convention is identical in both spreadsheets. This was all done manually in the past and now I'm trying to automate as much as possible.

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

    Re: Plug-in scores to a results sheet

    OK... but that doesn't really answer my question.

    Let's change tack... and look at row 29 on results sheet
    (with row 28 being AT: PD)

    M29: 80-N
    N29: PD1
    P29: NS1

    Having looked at the data that is listed on results sheet thus far I interpret the requirements in terms of matching to weekly_scores as being:

    Column A = PD (@ PD)
    Column D = 5 (week 5)
    Column F = 80 #1 ... 80 from M29 plus # from N29 (where FL-N becomes Flag # etc...)
    Column H = NS (remove the # from string in P29)
    Column I = 80 #1 ... 80 from M29 plus # from P29 (where FL-N becomes Flag # etc..)

    So where we find

    Please Login or Register  to view this content.
    we retrieve scores from columns G & J respectively (Home & Away)

    Is the above all correct ?

    The above is all based on my interpretation of your existing results. In your posts you fail to explain the relationship between these values and thus given the vague nature of the data and narrative most will have looked at this attachment and left it given it's not clear how you're getting the results. This is made all the worse if there are results that do not appear to tie out to source data as highlighted in my prior post.

  7. #7
    Registered User
    Join Date
    07-25-2004
    Posts
    24

    Re: Plug-in scores to a results sheet

    You are correct in your interpretation of what needs to happen.

    Does it make matching easier if that row you were working with becomes:

    Please Login or Register  to view this content.

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

    Re: Plug-in scores to a results sheet

    I'm honestly not sure - there seem to be quite a few inconsistencies.

    Attached is about as close as I could get based on your sample data - if you compare the two results sheets you will see there are a few differences, I don't know if this is because my sheet (results_DO) is more or less accurate than the original... for ex. you show results for LA / PT at home whereas I can find no records for these home associations on your weekly_scores sheet.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    07-25-2004
    Posts
    24

    Re: Plug-in scores to a results sheet

    I think you've got it actually. LA and PT did not turn their scores in online and thus they didn't make it into the database. The other missing scores are probably the same ... we also had rainouts made up after this snapshot of the data.

    I see you created a KEY in your scores sheet. That is something I could create in the database as well.

    This is good stuff. I'm a programmer so I can really appreciate the logic in your formula.

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

    Re: Plug-in scores to a results sheet

    Technically speaking you can do without the key but it reduces the workload significantly ie multi criteria lookups are generally inefficient.

    The layout of the fixtures table(s) is obviously not overly conducive to any type of analysis which is why the formula is quite convoluted ... with a better layout you could no doubt streamline but it should work ok on reasonably sized datasets.

    Has dawned on me rather belatedly that you could dispense with this section

    C7 etc: ...LOOKUP(2,1/(A$6:A6="AT :"),B$6:B6) and replace with just LEFT(B7,2) assuming all associates are always @@
    Last edited by DonkeyOte; 10-01-2009 at 10:01 AM.

  11. #11
    Registered User
    Join Date
    07-25-2004
    Posts
    24

    Re: Plug-in scores to a results sheet

    Each week the dataset is 100 rows or less.

    I can change the tables to be much more intuative. They were designed with the manual process in mind, so they served the purpose, but now that I look at automating it I would have done it much differently from the beginning.

    Your help is greatly appreciated.

  12. #12
    Registered User
    Join Date
    07-25-2004
    Posts
    24

    Re: Plug-in scores to a results sheet

    DonkeyOte - I have a new question for you. I need to do something similar with the same spreadsheet and database ... but in reverse. I think I found a tool that will take my .xls data and import it into a MySQL database. I don't think it will be able to work with my spreadsheet as-is. I would need to work with my Excel a bit.

    Would you be able to help me out .. again? I can even pay something for your time.
    Attached Files Attached Files

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

    Re: Plug-in scores to a results sheet

    New question - new thread please.

    In your new thread it would also be in your interests to outline the structure of your MySQL db - Table, Fields & Types
    perhaps include a 2nd sheet which has a column for each field etc with header to denote type

    In terms of getting info. from XL to MySQL: there are various routes open to you ranging from VBA/ADO to .csv/.txt files with MySQL command line prompts.

    In the most general of terms the process itself is not overly complex once/if the source data is stored in a coherent manner.

  14. #14
    Registered User
    Join Date
    07-25-2004
    Posts
    24

    Re: Plug-in scores to a results sheet

    I've started a new thread for my new task:

    http://www.excelforum.com/excel-gene...ml#post2485904


    Thanks in advance.

    Mike

+ 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