Sgn Function
Syntax
Sgn(Num)
Group
Description
Returns the sign
Parameters
| Parameters | Description |
|---|---|
| Num | Returns the sign of this numeric value. Returns -1 for negative. Returns 0 for zero. Returns 1 for positive. |
Example
Sub Main Debug.Print Sgn(9) ' 1 Debug.Print Sgn(0) ' 0 Debug.Print Sgn(-9) '-1 End Sub
See also