+ Reply to Thread
Results 1 to 19 of 19

Read last 10 individual results from a large data set

  1. #1
    Registered User
    Join Date
    05-03-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    95

    Read last 10 individual results from a large data set

    I'd like to read the 1st and last results of an individual from their last 10 results from a series of races.

    Eg. say I have the past 100 race results, positions from 1 to 5 (first to last); There are many competitors, not all of whom participate in every race. I would like a piece of code that looks at the last 10 races *for each individual* and records how many times they were first and last. First and last can be in two separate cells.

    example worksheet attached...

    Book1.xlsx

  2. #2
    Registered User
    Join Date
    05-03-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Read last 10 individual results from a large data set

    Note that the data set of races is split over different sheets, as in my example.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,324

    Re: Read last 10 individual results from a large data set

    Are you looking for VBA? If so, I'll move the thread.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    05-03-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Read last 10 individual results from a large data set

    I was hoping to achieve it with regular code. I was thinking COUNTIFS or something similar but I've not been able to achieve it myself and thought better coders might be able to help.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Read last 10 individual results from a large data set

    Why not all data in 1 worksheet and use 1 extra column to determine the sheetname (racename)?

    Edit:

    Having said that, it also will help if you add manualy the expected results in your file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Registered User
    Join Date
    05-03-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Read last 10 individual results from a large data set

    My data set is split over many sheets, different sheets for different race regions.

    Here is the example sheet with results manually added.

    Book1.xlsx

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,324

    Re: Read last 10 individual results from a large data set

    OK - that's not code, it's formulae.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Read last 10 individual results from a large data set

    Mmm. I think this is possibly FAR more complicated than you think. Your expected results can't be right, either, can they??? You have only 5 dates in total and (for example) Ringo came 2nd on the 5th May on each sheet. Some sprinter, if eachsheet = different region!!

    Oeldere's right. It'd be much easier if everything was compiled onto a single sheet (using formulae, or whatever... first). the single sheet can be hidden, for aesthetic reasons, if you wish.

    However, I'm not prepared to spend (potentially a lot of...) time on this until you a) agree the approach and b) provide sample data that are REPRESENTATIVE.

    the supply of non-representative dats is a massive timewaster on the Forum....
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  9. #9
    Registered User
    Join Date
    05-03-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Read last 10 individual results from a large data set

    Hello Glenn and thanks. The sheet was just an example but I've changed it so the dates are different. I want the formula to report back the 1st and last positions of each sprinter up to his/her last 10 races. Paul for eg has raced 7 times, with a win loss of W 1, L3

    It is fine to have all the data on one separate sheet, I could add another data sheet at the end which copies all the entries. I considered this first but then wasn't sure how to best copy the data while avoiding gaps in it. For example if I copy the last 10 races of each region, what if one region only has 2 races? There would then be 8 empty spaces. Whether this is a problem or not I don't know, as I don't know what formula to use to extract the results, COUNTIFS being my best guess.

    Book1.xlsx

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Read last 10 individual results from a large data set

    with a pivot table, after we put all data in the right format in sheet Oeldere.

    See the attached file.

  11. #11
    Registered User
    Join Date
    05-03-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Read last 10 individual results from a large data set

    Wow. This is amazing. Thank you very much Oeldere.

    Now how do I go about getting the data to correctly align on the sheet for the pivot table to read? I know you can't have any gaps with a pivot table.

  12. #12
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Read last 10 individual results from a large data set

    fill the data in the table (column A - D) like I did.

    Then they are ready for analysing with pivot table.

    I know you can't have any gaps with a pivot table.
    Explain since I don't understand

  13. #13
    Registered User
    Join Date
    05-03-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Read last 10 individual results from a large data set

    OK. What I meant was, does the table have to be created by hand or can it be created via formula copying the already existing data?

  14. #14
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,999

    Re: Read last 10 individual results from a large data set

    or Can try formula

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


    E6
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  15. #15
    Registered User
    Join Date
    05-03-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Read last 10 individual results from a large data set

    Thanks for the help, Shukla. But I'm not sure where I should put that code. Could you give more guidelines, or put it into my example workbook so that I can view it there?

  16. #16
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,999

    Re: Read last 10 individual results from a large data set

    You can paste the formula into the cells where required I have given cell reference also if you see.

  17. #17
    Registered User
    Join Date
    05-03-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Read last 10 individual results from a large data set

    I do but I don't understand.

    If I paste your code into a blank cell on the data sheet I just get a ref error. Do I need to place it in a certain cell, in every other cell, or in multiple cells. I'm sure this is what I'm looking for but I just don't know how to implement it.

  18. #18
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,101

    Re: Read last 10 individual results from a large data set

    Here is a copy of your file with shukla's formulas applied.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  19. #19
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Read last 10 individual results from a large data set

    I used Power query for it. it is available as add in for excel 2010. It is implemented in Excel 2016.

+ 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. [SOLVED] Macro to make individual worksheet read only
    By billgyrotech in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-15-2014, 01:20 PM
  2. [SOLVED] Mass Insert Individual Row for a large set of data
    By MavGunloc in forum Excel General
    Replies: 7
    Last Post: 02-15-2013, 02:50 AM
  3. Replies: 3
    Last Post: 11-01-2012, 08:15 PM
  4. calculating individual cells within large ranges
    By istanley24 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-08-2010, 10:50 AM
  5. Referencing one cell to individual cells in a large set
    By mremmenga in forum Excel General
    Replies: 2
    Last Post: 10-08-2008, 06:49 PM
  6. Data too large for Excel, need to query Access data for results
    By Susan in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-09-2006, 11:10 AM
  7. Altering read/write facility of individual cells
    By Nick Read in forum Excel General
    Replies: 5
    Last Post: 01-28-2005, 09:06 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