Hi Steve,
I spent some time re-examining the formulas and made some changes. Here's the current version, with some explanation of how the numbers are obtained.
The spreadsheet consists of three tables:
- Data: A table on which the results (time taken) for each race and each boat are entered. The best (ie. least) time is also calculated for each race.
- Index-1: A table with two rows for each boat. the upper one creates an index of races for which results have been recorded; the lower one calculates the percentage of that boat's time that must be deducted for it's adjusted time to match the winning time. The descriptive formula for this is (my time-best time)/my time.
- Last 5 and HC: A table with one row for each boat. The table extracts the five most recent percentage deductions calculated in Index-1 for each boat, then determines the average of the best (smallest) four of those percentages.
Here are the three tables, with sample data for three boats, and a listing and description of the formulas used in each table.
Date:

Row 1 contains the date for each weekly race.
Row 2 contains a serial number, used in the index to identify each completed race for each boat, and in the Last 5 table to determine which results to include in the current handicap calculation and as search values for the lookup formula extracting those values.
Row 3 shows the winning time (duration) for each race. B3 contains the formula =MIN(B4:B20)
Rows 4 to 20 (some are hidden in the image to save space) are each used to contain the race results for one boat. Cells in these rows are formatted for Duration, and may be empty, or contain a text notation for races that have not yet occurred, or in which that boat did not participate, or did not finish.
Index-1

Rows 1 and 2 repeat the first two rows on Data.
Row 3 is empty to allow the first boat to be in the same line on this table as it is on Data.
Rows 4-20 (again, some hidden) copy the race number for each race completed by the boat assigned to that row, using the formula (in B4):
=IF(ISBLANK(Data :: B4),"",IF(ISERROR(Data :: B4+DURATION(,,,,1)),"",B$2))
The two IF statements insert a null string ("") if cell B4 on Data is empty or if it contains a non-Duration value. If a Duration value is found (indicating the boat has completed that race), the formula inserts the race number found in B2.
Rows 21-23 are empty.
Rows 24-40 calculate the percentage handicap that would be necessary for the boat assigned to that row to match the winning time for each race in which the boat finished. Here's the formula, as it appears in B24:
=IFERROR((HLOOKUP(B4,Data :: $2:4,ROW()-21)-HLOOKUP(B4,Data :: $2:$3,2))/HLOOKUP(B4,Data :: $2:4,ROW()-21),"")
Reformatting to show the parts:
=IFERROR((
HLOOKUP(B4,Data :: $2:4,ROW()-21)-
HLOOKUP(B4,Data :: $2:$3,2))/
HLOOKUP(B4,Data :: $2:4,ROW()-21)
,"")
The top and bottom lines are an error trap that blocks the error message where 'B4' is empty, and HLOOKUP consequently has no value to lookup and returns a 'can't find' error.
The first and third HLOOKUP lines treat Data as a rolling lookup table . It's top row (row 1 of the Lookup table) is always row 2 of Data, where the race numbers are listed. Its bottom row is calculated from the row containing the formula. For the formula in ROW 24 (of Index-1), the bottom row is ROW 4 of Data, the 3rd row of the Lookup table, and the row containing the actual finish times for boat 14. ('my time' in the description above).
The second HLOOKUP line is similar, but the associated Lookup table contains only two lines—ROWS 2 and 3 of the Data table. This part returns the winning time ('best time' in the description) for each race where the boat assigned to its row has a finish time.
Together, the three center parts construct " ('my time' - 'best time')/'my time' ", with the result formated as a percentage with two decimal places.
Last 5 and HC%:

Rows 1 and 2 are empty.
Row 3 contains the numbers 5 to 1 in descending order, indicating the fifth most recent result, etc. The numbers are used in the forst formula in row 4 (and rows below that).
Row 4 contains three formulas. In B4, and filled right to F4:
=IFERROR(HLOOKUP(LARGE('Index-1' :: 4:4,B$3),'Index-1' :: 4:24,21),"")
Ignoring IFERROR (it's there for the same purpose as earlier), the rest of the formuls says:
"Look for the fifth (5 in B3) largest number in ROW 4 of Index-1 (the first row of the Lookup table—rows 4 to 24 of Index 1) and return the value 21 rows below it in the same column (boat 14's handicap as calculated for its fifth most recent race)."
As the formula is filled down to the rows for the rest of the boats, the top and bottom rows of the lookup table will adjust to match the two rows on Index-1 assigned to the next boat. Each lookup table will contain 21 rows.
The blue triangles in these cells are 'warning' triangles noting that the formula 'refers to cells without numbers.' They may be ignored.
In G4: =MAX(B4:F4)
Lets you know which value in the set is not being used. The result is used in the next formula, but it wold be as easy to place the calculation into that formula (as shown in the 'revised' version).
In H4: =(SUM(B4:F4)-G4)/4
H4 revised: =(SUM(B4:F4)-MAX(B4:F4))/4
Both version add the five values in B4—F4, subtract the largest value, then divide the result by 4 to find the average value.
That should provide enough to digest for the moment.
I've given a bit of thought to the carry over of percentages from the previous season(s), and an idea is beginning to gel. more to come.
Regards,
Barry