The article will focus on some key aspects of how to convert decimal numbers to hexadecimal format (hex) in Excel. There are many technical applications of hexadecimal numbers such as Assembly and Machine language. Programmers frequently use this number format to insert memory addresses. It can also be used to represent numbers kept in a CPU’s registers or in main memory as well as during the debugging phase of programming. It has a large application in data processing. So a computer or software engineer can effectively use Excel to convert decimal numbers to hexadecimal. The process of this conversion is very easy and time-saving.
Download Practice Workbook
2 Practical Ways to Convert Decimal Number to Hexadecimal (Hex) in Excel
In the dataset, we have some positive and negative decimals. We will convert them to hexadecimal in the following sections.
1. Using Excel DEC2HEX Function to Convert Decimal to Hex (Hexadecimal)
Excel has a built-in function to convert a decimal number to its hexadecimal format. The name of this function is DEC2HEX. Let’s have a look at it’s application.
- First, make a column to store the hexadecimal numbers and type the following formula in its first cell.
- After that, press the ENTER.
Thus you can convert any decimal number to hexadecimal format (hex) using Excel DEC2HEX function.
Read More: [Solved]: HEX2DEC Not Working in Excel
2. Converting Decimal to Hexadecimal with Colon
In some databases, the digits of a hexadecimal number need to be separated by colon symbols when the numbers are very large. To understand the procedure, please have a glance at the following description.
- First, make a column to store the hexadecimal numbers and type the following formula in cell C5.
- After that, press the ENTER button and you will see the decimal number in B5 converted to a hexadecimal number.
- Thereafter, drag the Fill icon to AutoFill the lower cells.
Thus you can get all the large decimal numbers as hexadecimal numbers (hex) with colons.
How to Convert Decimal Number to Other Number Formats
We can convert the decimals not only to the hexadecimal format but also to other formats like binary and octal. For that purpose, we use similar formulas with the DEC2BIN and DEC2OCT functions. Let’s follow the instructions below for a detailed overview. The DEC2BIN and DEC2OCT functions convert a decimal number to its binary and octal format.
- First, store your decimal numbers in a column and type the following formula to convert them to binary
- Next, use the Fill Handle to AutoFill the lower cells.
Thus you can convert your decimal data to binary format.
- Now, if you wish to convert the numbers to octal format, just use the formula given below.
- After that, fill the lower cells using the Fill Handle.
Thus you can convert a decimal number to other number formats such as binary and octal.
Things to Remember
- For the DEC2HEX function, the range of numbers that can be converted is [-2^39, 2^39 – 1] or [-549,755,813,888, 549,755,813,887]. If we insert any decimal number out of this range, the formula will return the Number (#NUM!)
- Similarly, the applicable number range for DEC2BIN and DEC2OCT functions are [-512,511] and [-536,870,912, 536,870,911]
Here, I’m giving you the dataset of this article so that you can practice these methods on your own and gain expertise.
In the end, we can conclude that the article will provide you some useful idea to convert a decimal number to its hexadecimal (hex) format. If you have any better suggestions or questions or feedback regarding this article, please share them in the comment box. This will help me enrich my upcoming articles. For more queries, kindly visit our website ExcelDemy.