Best lap time of N consequential laps

Johhny

New Member
Joined
Oct 21, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi!

I stucked and I am not sure whether this could be resolved in excel. Can you help?

I have a dataset (attached example) of lap times:
  • each record represents one lap time
  • there might be many drivers
  • there might be many sessions (occasions on which laps were taken)
  • each lap might be valid or invalid

My aim is to calculate best average lap time of N cosequential laps for each driver our of all sessions. By consequential lap I mean a series of consequential valid laps.

Book1.xlsx
ABCDEFGHIJKL
1SessionDriverLapNumValidLapTimeDriver
21A1TRUE10Best of:ABC
31A2TRUE1116
41A3FALSE928
51A4TRUE838
61A5TRUE104
71A6TRUE65
81A7FALSE7
9
Sheet1
Cell Formulas
RangeFormula
I5I5=SUM(E5:E7)/3
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
There are most likely other ways to do it, this is the first thing that came to mind.
Book1
ABCDEFGHIJK
1SessionDriverLapNumValidLapTimeDriver
21A1TRUE10Best of:ABC
31A2TRUE1116  
41A3FALSE927  
51A4TRUE838  
61A5TRUE1048.5  
71A6TRUE659  
81A7FALSE76   
Sheet1
Cell Formulas
RangeFormula
I3:K8I3=IF(COUNTIFS($B$2:$B$8,I$2,$D$2:$D$8,TRUE)<$H3,"",AVERAGE(AGGREGATE(15,6,$E$2:$E$8/$D$2:$D$8/($B$2:$B$8=I$2),SEQUENCE($H3))))
 
Upvote 0
Thank you for a quick reply :).

But is seems that there is something wrong:
  • there were not 4 nor 5 cons. valid laps in the example date, while your formula gives a result here
  • formula outcome for "Best of 2" seems incorrect. Best of 2 cons. valid laps is 8 (lap num 4 and lap num 5)

I think that this formula does not take into account that laps must be made in a row in order to be taken as a series ouf of which best average is taken.
 
Upvote 0
By consequential lap I mean a series of consequential valid laps.
So you actually mean 'consecutive' laps? Consequential has a completely different meaning, with the way your post was laid out it appeared to be clarifying the TRUE / FALSE criteria.

I think it should be possible, might take a while to find something that works though.

edit:-

Will the data be sorted by session, then driver, then lap, or can it be mixed up? Sorted should be possible, mixed I'm not so sure about.
 
Upvote 0
Not a problem, could you also check the edit that I made to my previous reply and clarify please.
 
Upvote 0
Will the data be sorted by session, then driver, then lap, or can it be mixed up? Sorted should be possible, mixed I'm not so sure about.

Actualy data will be sorted by date and time of each lap, so it will be mixed, but it is not a problem to sort this data by session, then driver, then lap.
 
Upvote 0
ignore that reply, as soon as I submitted it I noticed that the results were wrong, back to the drawing board. :oops:
 
Upvote 0
@Alex Blakenburg do you think that what is needed here could be done with a dictionary? After a few failed attempts with native formulas / functions, I'm starting to think that alternative methods may be required.
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,939
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top