Exceljet

Quick, clean, and to the point

Excel DEC2HEX Function

Excel DEC2HEX function
Summary 
The Excel DEC2HEX function converts a decimal number to its hexadecimal equivalent.
Purpose 
Converts a decimal number to hexadecimal
Return value 
Hexadecimal number
Syntax 
=DEC2HEX (number, [places])
Arguments 
  • number - The decimal number you want to convert to hexadecimal.
  • places - [optional] Pads the resulting number with zeros up to the specified number of digits. If omitted returns the least number of characters required to represent the number.
Usage notes 

The input must be a valid decimal number within the range [ -2^39, 2^39 - 1 ].

Negative Values

Excel internally represents Hexadecimal numbers in binary using 40 bits. The first bit indicates whether the number is positive or negative. The remaining bits indicate the magnitude of the number. Negative numbers are internally represented in binary using two's complement notation. Two's complement notation, when converted to hexadecimal, starts at the highest 10 digit hexadecimal number and goes backwards..

Range of DEC2HEX function

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.