Cells(11, 4).Value = Cells(9, 12).Value - Cells(11, 3).Value
For i = 12 To 30
If Cells(i - 1, 3).Value <> "" Then Cells(i, 4).Value = Cells(i - 1, 4).Value - Cells(i, 3).Value
If Cells(i - 1, 3).Value = "" Then Exit For
Next i
Cells(11, 11).Value = Cells(30, 4).Value - Cells(11, 10).Value
If Cells(11, 11) = 0 Then Cells(11, 11) = ""
For j = 12 To 30
If Cells(j - 1, 10).Value <> "" Then Cells(j, 11).Value = Cells(j - 1, 11).Value - Cells(j, 10).Value
If Cells(j - 1, 10).Value = "" Then Exit For
Next j