Sign()
Category: Number
Syntax: Sign ( number ) |
Parameters:
numberAny expression that resolves to a numeric value.
Data type returned: Text
Description:
Returns a value that represents the sign of number:
-1 when number is negative
0 when number is zero
1 when number is positive
For any x other than 0, multiplying x by Sign(x) yields the Abs(x).
Examples:
Function | Results |
---|---|
Sign (0) | Returns 0. |
Sign (100) | Returns 1. |
Sign( -100) | Returns -1 for the formula If (Sign (BalanceDue) = -1; "Please pay now!"; "Thanks for your payment!"). |
Категории