Sub test1()
Sheets("FinalData").Select
lastCol = Split(Cells(2, Columns.Count).End(xlToLeft).Address, "$")(1)
Range("A2").Select
Selection.End(xlToRight).Select
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "Running"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "Cycling"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "Strength(Mins)"
ActiveCell.Offset(1, 0).Formula = "=Sumif($B$2:" & lastCol & "$2,""*Strength(Mins)*"",B3:" & lastCol & "3)"
ActiveCell.Offset(1, 0).Formula = "=Sumif($B$2:" & lastCol & "$2,""*Cycling*"",B3:" & lastCol & "3)"
ActiveCell.Offset(1, 0).Formula = "=Sumif($B$2:" & lastCol & "$2,""*Running*"",B3:" & lastCol & "3)"
End Sub