sorry... :S
ID Laps Car Driver S1 S2
S3 Speed Lap Stint
26 1 72 GP 41.668 42.792 36.396 0
2:00.857 1
66 2 72 GP 32.137 40.858 35.517 262 1:48.512
109 3 72 GP 31.811 40.681 35.299 261
1:47.791
152 4 72 GP 31.596 40.559 35.393 260
1:47.549
196 5 72 GP 31.695 40.929 35.467 257
1:48.091
238 6 72 LR 31.631 40.726 35.217 259
1:47.574 2
ok so here is the data (with a few more rows than said before but I
was trying to make it simple....)
I have about 186 laps for I think about 12 cars in my spreadsheet.
So what I want to do is some race results analysis.
Through a table I tell Excel which car finished first, second, third,
fourth and fifth.
Then I want Excel through macros to do sort out the data I want, the
way I want it and in another worksheet.
On my other worksheet I have a table in looking like that:
Team Stint Driver Sector 1 Sector 2 Sector 3 Lap Max Speed
1 best
avr green
2 best
avr green
3 best
avr green
In team, a macro puts the number of the car (in the first row, the
winner, ...): it works
In Driver, depending on the number of the car and the stint number
another macro puts the name of the driver driving.
In Stints, a third macro puts the number of the laps, for example here
with GP it 1-5
Now what I want to do for each of my five first cars (not necessarily
the five first cars in my row data spreadsheet, in the last race for
example 72 above was not in the first 5) is in Sector 1, Sector 2,
Sector 3, Lap time and Max Speed put the best time/speed achieved (in
the best line) and the average in the average line.
The best and average have to be calculated in between the little 1 and
2 in the last column of my row data.
So in the second table, Stint 1 is happening between the marks 1 and
2, Stint 2 is in between 2 and 3, ....
So I need the macro to:
1- find the rows with the right car number
2- find the little 1
3- find the little 2
4- do the average and min/max values in this range for the Stint 1
5 do it again between 2 and 3 for Stint 2
6 between 3 and 4 for Stint 3
7... until all the Stints are done
then do it for the next car
I hope it's clear enough this time....
Thank for answering the first time, I hope you can help me!
Thanks in advance
|