Sgn(number) returns -1 if number is negative, 0 if number is 0, 1 if number is positive. : Sgn « Math Functions « VBA / Excel / Access / Word






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

 
Sub mathDemo11()
   Debug.Print Sgn(7)
End Sub

 








Related examples in the same category

1.Sgn(-7) returns -1
2.Sgn(0) returns 0
3.Sgn() Returns the sign of a number.