What is DEC2HEX function in Excel?
The DEC2HEX function is one of the Engineering functions of Excel.
It Converts a decimal number to hexadecimal.
We can find this function in Engineering of insert function Tab.
How to use DEC2HEX function in excel
- Click on an empty cell (like F5).

2. Click on the fx icon (or press shift+F3).

3. In the insert function tab you will see all functions.
4. Select ENGINEERING category.
5. Select DEC2HEX function.
6. Then select ok.

7. In the function arguments Tab you will see DEC2HEX function.
8. Number section is the decimal integer you want to convert.
9. Places section is the number of characters to use.
10. You will see the results in the formula result section.

Examples of DEC2HEX function in Excel
Example 1:
How to use DEC2HEX function in excel
You can see examples of DEC2HEX function below:

dec2hex(A2,B2) ----->>>>answer is 0000
dec2hex(A3,B3) ----->>>>answer is 0002
dec2hex(A4,B4) ----->>>>answer is 0004
dec2hex(A5,B5) ----->>>>answer is 0008
dec2hex(A6,B6) ----->>>>answer is 0010
dec2hex(A7,B7) ----->>>>answer is 0020
Purpose of DEC2HEX function
It Converts a decimal number to hexadecimal.
Return value of DEC2HEX function
It returns a number.
Arguments of DEC2HEX function
This function has just 2 Argument.
The argument of DEC2HEX function is number.
Number section is the decimal integer you want to convert.
Places section is the number of characters to use.
The argument of DEC2HEX function is required and not optional.
DEC2HEX(number) = number
Version of excel supports DEC2HEX function
This function is available for all excel versions (2003-2019)
Errors in DEC2HEX function
DEC2HEX related functions
- Use DEC2OCT function to convert a decimal number to an octal.
- Use DEC2BIN function to convert a decimal number into binary.
- Use HEX2DEC function to convert a hexadecimal number to decimal.
- Use DECIMAL function to Convert a text representation of a number in a given base into a decimal number.