HEX2OCT(number [,places])

Returns the number converted from hexadecimal to octal.

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

* If "number" is not a valid hexadecimal number, then #NUM! is returned.
* If "number" < 0, then "places" is ignored and a 10-character octal number is returned..
* If "number" < 0, it cannot be less than FFE0000000, and if number is positive, it cannot be greater than 1FFFFFFF.
* If "number" contains more than 10 characters (10 bits), then #NUM! is returned.
* If "number" contains 10 characters then the first number represents the sign of 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 is used.
* If "places" is not numeric, then #VALUE! is returned.
* If "places" is less than the number of characters needed, then #NUM! is returned.
* The "places" is useful for padding the return value with leading 0s (zeros).
* Any negative numbers are represented using two's complement notation.
* You can use the HEX2BIN function to convert a number from hexadecimal to binary.
* You can use the HEX2DEC function to convert a number from hexadecimal to decimal.
* You can use the OCT2HEX function to convert a number from octal to hexadecimal.
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

1=HEX2OCT("F", 3) = 17
2=HEX2OCT("F", 3.9) = 17
3=HEX2OCT("B7") = 267
4=HEX2OCT("3B4E") = 35516
5=HEX2OCT("FF00") = 177400
6=HEX2OCT("FFFFFFFFFF") = 7777777777
7=HEX2OCT("-400") = #NUM!
8=HEX2OCT("some text") = #NUM!
9=HEX2OCT("FFFFFFFFFF", "some text") = #VALUE!

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