Hi,
I am trying to create some type of code or formula to assist in creating final positions for riders in motocross. We have previously been doing this manually (handwritten) by griding laps and placing by riders number. Someone would call numbers out as they go past and watch 1st, 2nd or 3rd place and then when they come around again would move to the next lap.
We would then review at the end of the day and add races together based on rider placing/race. There could be several races/day. See simple example below
<tbody>
</tbody>
Each placing has a points value as per below
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>
</tbody>Didn't finish DNF
This works 95% of the time however with a large number of riders this can get very confusing due to the front runners lapping people and or falling off, you can get mixed up and it takes a long time to sort it out at the end of the day. I would also like to automate it as much as possible and use excel to calculate and work out all the fields.
I would like to simplify it by typing in the riders number in excel in a column. The code would then look up the column, count the maximum times a riders number appears, this would be the amount of maximum laps completed and then the last time it occurs return the place/position it occurs in the list. I would then like it to return the position and if possible points allocated for that position in a separate cell. Below is a simplified example.
<tbody>
</tbody>
This shows the maximum amount of laps any rider did was 4 and 333 was 1st, 222 was 2nd, 555 was 3rd and so on.
A couple of things to consider is the maximum number of laps done might only be completed by a minimum of one rider who would obviously be first and also some riders may not finish. DNF
I am new to coding so any help would be greatly appreciated.
I am trying to create some type of code or formula to assist in creating final positions for riders in motocross. We have previously been doing this manually (handwritten) by griding laps and placing by riders number. Someone would call numbers out as they go past and watch 1st, 2nd or 3rd place and then when they come around again would move to the next lap.
We would then review at the end of the day and add races together based on rider placing/race. There could be several races/day. See simple example below
1st | 2nd | 3rd | 4th | 5th | |
Lap 1 | 111 | 222 | 333 | 444 | 555 |
Lap 2 | 222 | 333 | 111 | 555 | 444 |
Lap 3 | 222 | 333 | 444 | 555 | 111 |
Lap 4 | 333 | 222 | 555 | 444 | 111 |
<tbody>
</tbody>
Each placing has a points value as per below
Placing | Points |
1 | 25 |
2 | 22 |
3 | 20 |
4 | 18 |
5 | 16 |
6 | 15 |
7 | 14 |
8 | 13 |
9 | 12 |
10 | 11 |
11 | 10 |
12 | 9 |
13 | 8 |
14 | 7 |
15 | 6 |
16 | 5 |
17 | 4 |
18 | 3 |
19 | 2 |
20 | 1 |
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>
</tbody>
This works 95% of the time however with a large number of riders this can get very confusing due to the front runners lapping people and or falling off, you can get mixed up and it takes a long time to sort it out at the end of the day. I would also like to automate it as much as possible and use excel to calculate and work out all the fields.
I would like to simplify it by typing in the riders number in excel in a column. The code would then look up the column, count the maximum times a riders number appears, this would be the amount of maximum laps completed and then the last time it occurs return the place/position it occurs in the list. I would then like it to return the position and if possible points allocated for that position in a separate cell. Below is a simplified example.
Bike numbers | Placing | Points |
111 | ||
222 | ||
333 | ||
444 | ||
555 | ||
222 | ||
333 | ||
111 | ||
555 | ||
444 | ||
222 | ||
333 | ||
444 | ||
555 | ||
111 | ||
333 | 1 | 25 |
222 | 2 | 23 |
555 | 3 | 20 |
444 | 4 | 18 |
111 | 5 | 16 |
<tbody>
</tbody>
This shows the maximum amount of laps any rider did was 4 and 333 was 1st, 222 was 2nd, 555 was 3rd and so on.
A couple of things to consider is the maximum number of laps done might only be completed by a minimum of one rider who would obviously be first and also some riders may not finish. DNF
I am new to coding so any help would be greatly appreciated.