Excel HEX2OCT Function

Using the Excel HEX2OCT Function


The Excel HEX2OCT function converts a hexadecimal number to an octal number.


=HEX2OCT (number, [places])

Syntax Breakdown

Required. The number, in hexadecimal format, that you wish to convert to octal. Negative numbers are represented using two's-complement notation. The first bit represents if the number is negative or positive, with the remaining bits indicating the magnitude of the number.

If number is positive, it cannot be greater than 1FFFFFFF, and if number is negative, it cannot be less than FFE0000000.

Optional. The number of characters to use. If omitted, the function uses the minimum number of characters necessary. If the entry isn't an integer, it will be truncated.

Usage Notes

HEX2OCT converts a number from hexadecimal format to its octal equivalent.

HEX2OCT Errors
The function will return an error in the following instances:

1) The #NUM! error if number isn't a valid hexadecimal number

2) The #NUM! error if not enough spaces are provided

3) The #VALUE! error if places is non-numeric

4) The #NUM! error if places is negative