OCT2HEX

Converts an octal number to hexadecimal.

Sample Usage

OCT2HEX(101)
OCT2HEX(C5)

Syntax

OCT2HEX(number, [places])

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

Examples

OCT2HEX(101) returns a value of 41.
OCT2HEX(101,3) returns a value of 041.
OCT2HEX(C5) converts the binary number contained in C5 to hexadecimal.

Notes

  • If number is negative, the value of places is ignored and OCT2HEX returns a 10-character hexa-decimal number. 
  • number cannot contain more than 10 characters.
  • number can have a maximum value of 777 if positive, and a minimum of 7777777000 if negative. 
  • If number is not a valid octal number, OCT2HEX returns the #NUM! error value.
  • If places is not an integer, it is truncated.
  • If places is non-numeric, OCT2HEX returns the #VALUE! error value.
  • If places is negative, OCT2HEX returns the #NUM! error value.
  • If the number of digits required is greater than the specified places, the #NUM! error is returned.