The formula below does the trick. For example I might have 168 as the miles travelled in cell A2 and 64. A2 B224 into a blank cell where you want to output the result and then drag the fill handle down to the cells you want to get all results see screenshot.
See the VBA code here.
Calculating the average speed from distance and time the following formula can help you. Getting it to display correctly as eg. The function will return the Miles per hour. See the VBA code here.