Code:
Sub Insert24x31()
With Range("A1:A744")
    .Formula = "=INT((ROW()-1)/24)+1"
    .Value = .Value
End With
End Sub