Returns the sign of a number, positive or negative.
Syntax Sgn(Number) Key Number The number to return the sign of.
If number > 0, then Sgn() will return 1.
If number = 0, then Sgn() will return 0.
If number < 0, then Sgn() will return -1.
The Sgn() function may be used in VBA or in an SQL query.
Dim intDemo as Integer
intDemo = Sgn(64)
“One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs” ~ Robert Firt
Abs - The absolute value of a number (ignore negative sign).
Int - Return the integer portion of a number.
Excel has an equivalent function sign()