+ Reply to Thread
Results 1 to 13 of 13

Create a list of Min values from data table

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Create a list of Min values from data table

    As the title suggests I want to create a list of Lap records from a list of races, listed by year and venue.

    The table Race Data is a list of the raw data that I want to pare down to a list of records for each venue. The times are listed in 2 columns "N & O". One is the time for qualifying and the other is a list of times during the race. The fastest time for a venue of either qualifying or race time is the record. I can figure out how to find the Fastest time (lowest value) for one column but trying to select between 2 columns is giving me a problem.

    I also want to match the fastest time with a Driver (column I) and the year (column C).

    Thanks

    Jim O
    Attached Files Attached Files
    Last edited by JO505; 07-05-2013 at 03:13 PM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Create a list of Min values from data table

    This ARRAY formula gives you the expected result?

    =MIN(IF('Race Data'!$E$2:$E$100=C2,'Race Data'!$N$2:$O$100))

    -- Array(CSE) { }, formulae are confirmed with Control+Shift+Enter.
    Not just Enter.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: Create a list of Min values from data table

    Fotis,

    Thank you for the reply.

    That works well for finding the time but I am running into an issue when I try to Index the name or year to the time as a reference.

    Do I need to set up some kind of a helper column or is their a formula to find the desired data? I am getting # N/A errors.

    See attached.

    Jim O
    Attached Files Attached Files

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Create a list of Min values from data table

    Does this works?
    Attached Files Attached Files

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Create a list of Min values from data table

    I think this is the correct one..

    =IFERROR(IFERROR(INDEX('Race Data'!$I$2:$I$97;MATCH(D2;'Race Data'!$N$2:$N$97;0));INDEX('Race Data'!$I$2:$I$97;MATCH(D2;'Race Data'!$O$2:$O$97;0)));"no results")


    Edit: @ XOR LX

    Now i think the same. Just way i changed my previous post formulas.
    Attached Files Attached Files
    Last edited by Fotis1991; 07-05-2013 at 01:43 PM. Reason: Edit

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Create a list of Min values from data table

    And this array formula in F2 will get you your Driver (can't believe there's nothing simper, though!):

    =INDEX('Race Data'!$I$2:$I$97,CHOOSE(1+(MIN(IF('Race Data'!$E$2:$E$97=Record!$C2,'Race Data'!$N$2:$N$97))<MIN(IF('Race Data'!$E$2:$E$97=Record!$C2,'Race Data'!$O$2:$O$97))),MATCH(MIN(IF('Race Data'!$E$2:$E$97=Record!$C2,'Race Data'!$O$2:$O$97)),'Race Data'!$O$2:$O$97,0),MATCH(MIN(IF('Race Data'!$E$2:$E$97=Record!$C2,'Race Data'!$N$2:$N$97)),'Race Data'!$N$2:$N$97,0)))

    Change this part at the start: 'Race Data'!$I$2:$I$97 to 'Race Data'!$C$2:$C$97 and keep everything else the same for the Year.

    Notice that there are a few #N/As in there due to Indianapolis Motor Speedway having blanks in the Race time column.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Create a list of Min values from data table

    I thought the idea was that the fastest time could come from either column N or column O?

    Which is what my (rather cumbersome) formula attempted to resolve.

    Regards

  8. #8
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: Create a list of Min values from data table

    Thanks for the replies,

    I am curious as to why no results are shown for the Indianapolis Motor Speedway. Their are time listed, although they are less than 60 seconds, I don't understand why they don't show up?

    Jim O

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Create a list of Min values from data table

    Jim.A quick view to sheet(i don't have time any more..) looks that for Indianapolis there are not times for the race. Only for pole...Look around it.

  10. #10
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: Create a list of Min values from data table

    That is what I was looking for, to select the fastest time from either column for a single venue. i.e. if the Indianapolis race only has one time, then that should be returned as the fastest.

    Jim O

  11. #11
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: Create a list of Min values from data table

    As their are only a few Races at Indianapolis I just add the pole time to the race time, so their are no blank values. I can make any modification later.

    I will consider this as solved and what to thank all who provided feedback.

    It's a great forum!!

    Thanks again.

    Jim O

  12. #12
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Create a list of Min values from data table

    @Fotis

    Not sure I agree with your logic there. How do you know that a given time doesn't match in the first choice of indexed columns, but for a completely different race/driver?

    @JimO

    I will try and have a look at adapting my formula for cases where blanks are present, though I haven't yet received any feedback so not even sure that the first version's giving you the desired results?

    Regards

  13. #13
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Create a list of Min values from data table

    Quote Originally Posted by XOR LX View Post
    @Fotis

    Not sure I agree with your logic there. How do you know that a given time doesn't match in the first choice of indexed columns, but for a completely different race/driver?
    Me too! It was Friday evening(21:00pm) when i posted my last reply...

    So my opinion is that these INDEX & MATCH formula don't give the correct result because they try to match only the faster time and not the venue AND the faster time!! This ARRAY entered formula does this.

    =IFERROR(INDEX('Race Data'!$I$2:$I$100;MATCH($C2&$D2;'Race Data'!$E$2:$E$100&'Race Data'!$N$2:$N$100;0));INDEX('Race Data'!$I$2:$I$100;MATCH($C2&$D2;'Race Data'!$E$2:$E$100&'Race Data'!$O$2:$O$100;0)))

    This formula gives almost same results as the first one EXCEPT of 1 result which proove that first formula was not correct. Look the results for AVUS venue and compare the results..

    ..As their are only a few Races at Indianapolis I just add the pole time to the race time, so their are no blank values. I can make any modification later.

    @ Jim

    Min(if formula takes the empty cells like zeros values and gives 0 as result. I modified a little the formula(adding 1 more if) and now works fine!

    =MIN(IF('Race Data'!$E$2:$E$1000=C2;IF('Race Data'!$N$2:$O$1000<>"";'Race Data'!$N$2:$O$1000)))
    Attached Files Attached Files

+ 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