ajBigNumCompareTo function
Available for AlchemyJ Excel Library, AlchemyJ Enterprise Edition
Description
Compares if BigNumber number1 is greater than number2. Returns 1 if number1 is greater than number2. Returns -1 if number1 is smaller than number2. Returns 0 if number1 is equals to number2.
Syntax
ajBigNumCompareTo(number1,number2)
Argument Name | Argument Type | Description |
---|---|---|
number1 (required) | String | The number to be compared with the number2. It should be a number in number or string format. For example, -1 or "-1". |
number2 (required) | String | The number to be compared with the number1. It should be a number in number or string format. For example, -1 or "-1". |
The function will return:
1) Return Value: -1/0/1
2) Return Type: Single Value
Example
=ajBigNumCompareTo("1234567890123456789","1234567890123456780")
The function returns 1 since number1 is greater than number2.
Error Scenarios
It will return #VALUE! when missing any required parameter or mismatch parameter type. Besides, system will raise error for below scenario(s).
Error Scenario |
---|
Number1 is neither a number or a string that can be converted to a number. |
Number2 is neither a number or a string that can be converted to a number. |