HEX2OCT

  • Updated

Converts a hexadecimal number to octal.

Sample Usage

HEX2OCT(110)
HEX2OCT(C5)

Syntax

HEX2OCT(number, [places])

  • number - The hexadecimal number to be converted.
  • places - [OPTIONAL] The number of places in the output.

Examples

HEX2OCT(110) returns a value of 420.
HEX2OCT(110,4) returns a value of 0420.
HEX2OCT(C5) converts the hexadecimal number contained in C5 to octal.

Notes

  • If number is negative, the value of places is ignored and HEX2OCT returns a 10-character octal number. 
  • number cannot contain more than 10 characters.
  • Hexadecimal digits are not case-sensitive.
  • number can have a maximum value of 1FF if positive, and a minimum of FFFFFFFE00 if negative. 
  • If number is not a valid hexadecimal number, HEX2OCT returns the #NUM! error value.
  • If places is not an integer, it is truncated.
  • If places is non-numeric, HEX2OCT returns the #VALUE! error value.
  • If places is negative, HEX2OCT returns the #NUM! error value.
  • If the number of digits required is greater than the specified places, the #NUM! error is returned.