Returns the sign of a numeric expression.
Sgn (number)
Number - (Input, expression, Required)
If a string is passed, it is first converted to numeric form. If a non-numeric value is passed, Error is returned
1 if the expression is greater than or equal to zero, otherwise –1 is returned.
Sgn (0) |
Returns 1 |
Sgn (1) |
Returns 1 |
Sgn (-2) |
Returns -1 |
Sgn (“-3.4”) |
Returns -1 |
Sgn (Null) |
Returns Error |
Sgn (Error) |
Returns Error |
Please note that these functions are specifically for use in the Macro Editor. Refer to Microsoft's official VB and JScript documentation for scripting equivalents.
Abs function | Atn function | Cos function | Exp function | Fix function | Int function | Log function | Max function | Min function | Rnd function | Round function | Sgn function | Sin function | Sqr function | Tan function
© 2004-2021 looksoftware. All rights reserved.