Sub test()
Dim Arr, T%, T1%, Et, i&
T = 270
Arr = Range("a1:b" & [a65536].End(3).Row)
For i = 3 To UBound(Arr)
If Arr(i, 1) = "" Then GoTo 99
If Arr(i, 1) >= 1080 Then
Cells(i, 4) = Application.Round((Arr(i, 1) / T), 0): GoTo 99
Else
For i2 = i To UBound(Arr)
If T1 >= 1080 Then Exit For
If Arr(i2, 1) <> "" Then T1 = T1 + Arr(i2, 1)
Next
End If
For i3 = i To i2 - 1
If Arr(i3, 1) = "" Then GoTo 98
Arr(i3, 1) = Arr(i3, 1) - Et
Cells(i3, 4) = Application.RoundUp((Arr(i3, 1) / T), 0)
Et = T * Cells(i3, 4) - Arr(i3, 1)
98: Next
i = i2 - 1: T1 = 0: Et = 0
99: Next
End Sub