OCT2HEX(number [,places])

Returns the number converted from octal to hexadecimal.

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

* Number may not contain more than 10 octal characters (30 bits). The most significant bit of number is the sign bit. The remaining 29 bits are magnitude bits. Negative numbers are represented using two's-complement notation.
* If "number" < 0, then "places" is ignored and a 10-character hexadecimal number is returned.
* If "number" is not a valid octal number, then #NUM! is returned.
* If "places" is not an integer, it is truncated.
* If "places" is not numeric, then #VALUE! is returned.
* If "places" < 0, then #NUM! is returned.
* If "places" is left blank, then the minimum number of characters necessary. Places is useful for padding the return value with leading 0s (zeros).
* If "places" is not enough characters, then #NUM! is returned.
* You can use the OCT2BIN function to convert a number from octal to binary.
* You can use the OCT2DEC function to convert a number from octal to decimal.
* You can use the HEX2OCT function to convert a number from hexadecimal to octal.
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

1=OCT2HEX(100, 4) = 40
2=OCT2HEX(7777777533) = FFFFFFFF5B
3=OCT2HEX(-10) = #NUM!
4=OCT2HEX(2, "some text") = #VALUE!

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