1.
x = Val(InputBox("Input X: "))
If x < 10 Then y = Abs(x)
If x <= 20 Then y = Sqr(3 * x - 1)
If x > 20 Then y = 3 * x + 2
Debug.Print y
2.
x = Val(InputBox("Input X: "))
If x < 10 Then
y = Abs(x)
ElseIf x <= 20 Then y = Sqr(3 * x - 1)
ElseIf x > 20 Then y = 3 * x + 2
End If
Debug.Print y
3.
x = Val(InputBox("Input X: "))
select case x
case x < 10
y = Abs(x)
case <= 20
y = Sqr(3 * x - 1)
case else
y = 3 * x + 2
end select
Debug.Print y