Sub t()
Dim temp
Dim nB%, nA%, i%, n%
Const Bog$ = "bogies"
Const Ax$ = "axles"
With Sheets(1)
i = 1
Do While .Cells(i, 1).Value <> ""
temp = Split(.Cells(i, 1).Value, " ")
For n = LBound(temp) To UBound(temp)
If LCase(temp(n)) Like "*" & Bog & "*" Then
nB = nB + Val(Replace(temp(n - 1), "-", ""))
ElseIf LCase(temp(n)) Like "*" & Ax & "*" Then
nA = nA + Val(Replace(temp(n - 1), "-", ""))
End If
Next n
i = i + 1
Loop
End With
Debug.Print Bog & " " & nB
Debug.Print Ax & " " & nA
End Sub