### OCT2HEX(number [,places])

Returns the number converted from octal to hexadecimal.

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

#### Remarks

 * 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.* In Excel 2007 the accuracy of this function was improved.* In Excel 2003 this function was only available when you had the Analysis ToolPak add-in loaded.* For the Microsoft documentation refer to support.office.com

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