Sgn() Returns the sign of a number. : Sgn « Math Functions « VBA / Excel / Access / Word






Sgn() Returns the sign of a number.

 
Sub mathF7()
    Debug.Print Sgn(-9)
End Sub

 








Related examples in the same category

1.Sgn(number) returns -1 if number is negative, 0 if number is 0, 1 if number is positive.
2.Sgn(-7) returns -1
3.Sgn(0) returns 0