HEX2OCT

The HEX2OCT function converts a hexadecimal number to the corresponding octal number.

HEX2OCT(hex-string, convert-length)

hex-string: The string value representing the number to be converted. hex-string must contain only the numbers 0 through 9 and the letters A through F.

convert-length: An optional number value specifying the minimum length of the number returned. convert-length must be in the range 1 to 32. If convert-length is omitted, it is assumed to be 1. If it is included, the number returned is padded with leading zeros, if necessary, so that it is at least the length specified by convert-length.

Notes

Examples

=HEX2OCT(“F”, 3) returns 017.

=HEX2OCT(“3F”) returns 77.

=HEX2OCT(“-F”, 8) returns an error, as the minus sign is not permitted.

See also
BIN2OCT
DEC2OCT
HEX2BIN
HEX2DEC
OCT2HEX