DEC2HEX

The DEC2HEX function converts a decimal number to the corresponding hexadecimal number.

DEC2HEX(decimal-string, convert-length)

decimal-string: The string value representing the number to be converted. decimal-string must contain only the numbers 0 through 9.

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

=DEC2HEX(100) returns 64.

=DEC2HEX(“1001”, 4) returns 03E9.

=DEC2HEX(-100) returns FFFFFF9C.

See also
BIN2HEX
DEC2BIN
DEC2OCT
HEX2DEC
OCT2HEX