Excel OCT2HEX function

Function              OCT2HEX

Description        Excel OCT2HEX function converts Octal number system to Hexadecimal number system.

Syntax                  OCT2HEX(number, [places])

Number               is the octal number and it should not be more than 10 characters. Negative numbers are returned with two’s complement method.

[places]                                Optional. Which specifies the number of characters that you want the returned hexadecimal number to have. If omitted returns the least number of characters required to represent the number.

Example:

Usage Notes:

  • If number is negative, OCT2HEX ignores places and returns a 10-character hexadecimal number.
  • OCT2HEX returns the #NUM! error value when number is not a valid octal number.
  • It returns the #NUM! error value when OCT2HEX requires more than places characters.
  • If places is non-integer, it is truncated.
  • OCT2HEX returns the #VALUE! error value when places is nonnumeric.
  • OCT2HEX returns the #NUM! error value when places is negative.