Good, glad it worked for you. I've actually done a little more including the minimum times and some formatting. Come back if you get stuck, otherwise good luck.
Sub x()
Dim rTeam As Range, rPit As Range, rSector As Range, rng As Range
Dim r As Long, c As Long, r1 As Long, c1 As Long
r = 5: c = 6
Application.ScreenUpdating = False
Sheets("Stint Analysis").Range("F:J").ClearContents
With Sheets("Race Results")
Set rTeam = .Range("C2", .Range("C2").End(xlDown))
Set rPit = .Range("J2", .Range("J2").End(xlDown))
Set rSector = .Range("E2", .Range("E2").End(xlDown))
For Each rng In .Range("L1", .Range("L1").End(xlDown))
For r1 = 0 To 21 Step 3
For c1 = 0 To 2
With Sheets("Stint Analysis").Cells(r + r1, c + c1)
.Offset(-1).FormulaArray = _
"=MIN(IF(('Race Results'!" & rTeam.Address & "=" & rng.Value & ")*('Race Results'!" & rPit.Address & "='Stint Analysis'!$B" & r + r1 - 1 & "),'Race Results'!" & rSector.Offset(, c1).Address & "))"
.FormulaArray = _
"=AVERAGE(IF(('Race Results'!" & rTeam.Address & "=" & rng.Value & ")*('Race Results'!" & rPit.Address & "='Stint Analysis'!$B" & r + r1 - 1 & "),'Race Results'!" & rSector.Offset(, c1).Address & "))"
End With
Next c1
Next r1
r = r + 24
Next rng
With Sheets("Stint Analysis").Range("F:J")
.Font.Name = "Arial"
.Font.Size = "8"
.NumberFormat = "ss.000"
.SpecialCells(xlCellTypeFormulas, xlErrors).ClearContents
End With
End With
Application.ScreenUpdating = True
End Sub
Bookmarks