Converts a decimal number to octal.
Sample Usage
DEC2OCT(115)
DEC2OCT(C5)
Syntax
DEC2OCT(number, [places])
- number - The decimal number to be converted.
- places - [OPTIONAL] The number of places in the output.
Examples
DEC2BOCT(115) returns a value of 163.
DEC2OCT(115,5) returns a value of 00163.
DEC2OCT(C5) converts the decimal number contained in C5 to octal.
Notes
- If number is negative, the value of places is ignored and DEC2OCT returns a 10-character octal number in which the most significant bit is the sign bit. The remaining 9 bits are magnitude bits.
- If number < -536,870,912 or if number > 536,870,911, DEC2OCT returns the #NUM! error value.
- If number is non-numeric, DEC2OCT returns the #VALUE! error value.
- If places is not an integer, it is truncated.
- If places is non-numeric, DEC2OCT returns the #VALUE! error value.
- If places is negative, DEC2OCT returns the #NUM! error value.
- If the number of digits required is greater than the specified places, the #NUM! error is returned.