In this article, you will learn about the HEX2OCT function, the formula syntax and usage of the function in Microsoft Excel.
HEX2OCT Function in Excel
The HEX2OCT function in Excel converts a hexadecimal number to its octal value.
- Number The hexadecimal number you want to convert to an octal number.
- Places – Optional
When left out or neglected, it uses the least number of characters required to represent the number, or else it combines the result with zeros up to the specified number of places.
- When the number is less than zero, HEX2OCT ignores places and returns a 10-character octal number.
- When the number is less than zero, it shouldn’t be less than FFE0000000, and When the number is greater than zero, it shouldn’t be greater than 1FFFFFFF.
- And if the first argument ‘number’ is not a valid hexadecimal number, HEX2OCT returns the #NUM! error value.
- If HEX2OCT requires more than places characters, it returns the #NUM! error value.
- If places is not an integer, it is truncated.
- While the places is nonnumeric, HEX2OCT returns the #VALUE! error value.
How to use the HEX2OCT function in Excel?
Using this function in a WS is simple; all you need to do is enter the function as a formula of the cell in the formula bar.
Take a look at the given example
The above numbers are the Hexadecimal version of some octal numbers. To find out the octal numbers, Enter the given Hexadecimal numbers in column A and in Column B enter the second argument ‘places’ and in Column C, enter the following formula
Here, A1 refers to the cell name or the cell address. Repeat the same to the other cells and you will get the octal values of the Hexadecimal numbers.