DEC2HEX

Using the Excel DEC2HEX Function

Summary

The Excel DEC2HEX function converts a decimal number to a hexadecimal number.

Syntax

=DEC2HEX (number, [places])

Syntax Breakdown

Number
Required. The number, in decimal format, that you wish to convert to hexadecimal. Negative numbers are represented using two's-complement notation. If the number argument is negative, the places argument will be ignored and the function will return a 10 character (40 bit) hexadecimal number.

Places
Optional. The number of characters to be used. If omitted, the function uses the minimum number of characters necessary. If the input is not an integer, it will be truncated.


Usage Notes

DEC2HEX converts a number from decimal format to its hexadecimal equivalent.

DEC2HEX Errors
The function will return an error in the following instances:

1) The #NUM! error if places is negative

2) The #VALUE! error if places in non-numeric

3) The #NUM! error if number is < -549,755,813,888 or > 549,755,813,887

4) The #VALUE! error if number is non-numeric

5) The #NUM! error if not enough places are provided