DEC2OCT(number [,places])

Returns the number converted from decimal to octal.

numberThe decimal integer you want to convert.
places(Optional) The number of characters to use.


* If any of the arguments are not numeric, then #VALUE! is returned.
* If "number" < -536,870,912, then #NUM! is returned.
* If "number" > 536,870,911, then #NUM! is returned.
* If "number" < 0, then "places" is ignored and a 10-character (30-bit) octal number is returned. The first bit is the sign.
* If "number" < 0, then two's-complement notation is used to represent the number.
* If "places" is not an integer, it is truncated.
* If "places" < 0, then #NUM! is returned.
* If "places" is left blank, then the minimum number of characters necessary.
* The "places" is useful for padding the return value with leading 0s.
* If "places" is less than the number of characters, then #NUM! is returned.
* You can use the DEC2BIN function to return a number converted from decimal to binary.
* You can use the DEC2HEX function to return a number converted from decimal to hexadecimalr
* You can use the OCT2DEC function to return a number converted from octal to decimal.
* For the Microsoft documentation refer to

1=DEC2OCT(58,3) = 072
2=DEC2OCT(-100,2) = 7777777634
3=DEC2OCT(-100) = 7777777634
4=DEC2OCT(100,5) = 00144
5=DEC2OCT(-100,5) = 7777777634
6=DEC2OCT(-100,-2) = #NUM!
7=DEC2OCT(100,2) = #NUM!
8=DEC2OCT("some text",10) = #VALUE!
9=DEC2OCT(10,"some text") = #VALUE!

© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited Top