Step 1 – Convert Decimal Numbers to Hex Format Using the DEC2HEX Function in Excel
- Enter the following formula:
=DEC2HEX(B5)
- Drag down the Fill Handle to see the result in the rest of the cells.
Step 2 -Format Hex Numbers with a Leading Zero Using the Excel RIGHT Function
- The generic formula is:
RIGHT("Zeros" & cell, string length)
- In D5, enter the following formula to add a zero before the hexadecimal number:
=RIGHT("0"&C5, 6)
- Drag down the Fill Handle to see the result in the rest of the cells.
Things to Remember
You can use the TEXT function if all numbers are in numeric format, but not with alphabet letters (this method has a limitation in the hexadecimal number system but not in the binary, octal, or decimal number system).
- Enter the following formula:
=TEXT(C14,"00")
- Drag down the Fill Handle to see the result in the rest of the cells.
The TEXT function failed to add a leading zero before A, B, C, D, E, F.
Download Practice Workbook
Download the practice workbook.
<< Go Back to | Excel Number System Conversion | Excel for Math | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!