Author: Oscar Cronquist Article last updated on October 13, 2022

How to use the HEX2OCT function

The HEX2OCT function converts hexadecimal to octal.

1. HEX2OCT Function Syntax

HEX2OCT(number, [places])

2. HEX2OCT Arguments

number Required. The hexadecimal number you want to convert to an octal number.
[places] Optional. The number of characters to show.

3. Comments

The hexadecimal numeral system has a base of 16, 0-9 represents zero to nine, and A, B, C, D, E, and F represent values ten to fifteen.

The octal numeral system has a base of 8. 0-7 in the decimal system represents zero to seven in the octal system. 8 is 10, 9 is 11, and so on.

How to use the HEX2OCT function too many characters

The hexadecimal argument can't contain more than 10 characters.

How to use the HEX2OCT function ignores places if neagtive hexadecimal

HEX2OCT ignores places and returns a 10-character octal number if the hexadecimal is negative.

How to use the HEX2OCT function range limit

The smallest hexadecimal value is FFE0000000 and the largest is 1FFFFFFF. Values larger or smaller than the specified range are not allowed.

How to use the HEX2OCT function not valid hexadecimal

HEX2OCT returns the #NUM! error value if the hexadecimal value is not valid.

How to use the HEX2OCT function num error if it requires more places

HEX2OCT function returns #NUM! error value if it requires more than the places argument allows.

How to use the HEX2OCT function truncated if not an integer

The places argument is truncated if not an integer.

How to use the HEX2OCT function places is a nonnumeric value

HEX2OCT returns the #VALUE! error value if the places argument is a non-numeric value.

How to use the HEX2OCT function places is a negative number

The HEX2OCT function returns #NUM! error if places argument is negative.

4. HEX2OCT Function Example

How to use the HEX2OCT function

The image above shows the HEX2OCT function in cell C3, it calculates the octal number based on the specified number in cell B3.

Formula in cell C3:

=HEX2OCT(B3)

5. Hex to octal conversion table

How to use the HEX2OCT function hex to octal conversion table