Use if, ElseIf and Else with ActiveCell
Sub MyMacro()
If ActiveCell.Value > 1000 Then
ActiveCell.Offset(0, 1).Value = ActiveCell.Value * 0.05
ElseIf ActiveCell.Value > 500 Then
ActiveCell.Offset(0, 1).Value = ActiveCell.Value * 0.025
Else
ActiveCell.Offset(0, 1).Value = 5
End If
End Sub
Related examples in the same category