i came up with this code but get error, loop without do
Sub calc_all()
Dim i As Integer
i = 1
Do While Cells(i + 21, 31).Value <> ""
If Cells(21 + i, 37) < 0 Then
Cells(21 + i, 41).Value = -(10 ^ (Abs(Cells(21 + i, 37) / 3 - 1)))
Else
Cells(21 + i, 41).Value = (10 ^ (Abs(Cells(21 + i, 37) / 3 - 1)))
End If
If Cells(21 + i, 39) < 0 Then
Cells(21 + i, 42).Value = -(10 ^ (Abs(Cells(21 + i, 39) / 3 - 1)))
Else
Cells(21 + i, 42).Value = (10 ^ (Abs(Cells(21 + i, 39) / 3 - 1)))
End If
Cells(21 + i, 43).Value = Abs((Cells(19 + i, 41) - Cells(19 + i, 42)))
Cells(21 + i, 44).Value = Abs((Cells(21 + i, 43) - Cells(21 + i, 30)))
Cells(21 + i, 45).Value = 3 * Application.WorksheetFunction.Log10(1 + (Cells(21 + i, 44)))
If Cells(21 + i, 42) < Cells(21 + i, 30) Then
Cells(21 + i, 46).Value = (Cells(21 + i, 42)) + (Cells(21 + i, 44) * 0.1)
Else
Cells(21 + i, 46).Value = (Cells(21 + i, 42)) - (Cells(21 + i, 44) * 0.1)
i = i + 1
Loop
End Sub