# How to Convert A Hexadecimal Number to Decimal in Excel

Sometimes we use hexadecimal numbers to mark products in daily life, and we want to convert these hexadecimal numbers to decimal numbers in some situations. We can convert number between two number types by convert tool online, actually we can also convert numbers by function in excel as well. In excel, **=HEX2DEC(number)** can help you to convert hexadecimal number to decimal properly, and on the other side, you can use **=DEX2HEX(number)** to convert decimal to hexadecimal number.

**Part 1. Convert Hex Number to Decimal in Excel**

As we mentioned above, we can use HEX2DEC function to convert numbers conveniently. Just prepare a table with two columns, one column is used for recording HEX numbers, the second column is used for saving the converted decimal numbers.

**Step 1:** in B1 enter the formula **=HEX2DEC(A2)**.

**Step 2:** Click **Enter** to get returned value. So 21163 in B2 is the mapping decimal number for 52AB.

**Step 3:** Drag the fill handle down to fill the following cells.

Verify that all hexadecimal numbers are converted to decimal numbers correctly. You can also double check the result by convert tool online to make sure the result is correct.

**Note:**

Sometimes hexadecimal numbers are displayed like 0x52AB, user can remove 0x before 52AB and then use HEX2DEC function to convert number.

**Part 2. Convert Decimal to Hex Number in Excel**

Prepare another table, the first column is Decimal, the second column is Hex Number.

**Step 1:** in B10 enter the formula **=HEX2DEC(A2)**.

**Step 2:** Click **Enter** to get returned value. So 4D2 in B10 is the mapping hex number for 1234.

**Step 3:** Drag the fill handle down to fill the following cells.

**Note:**

There are some other functions to convert numbers between different types. See below screenshot.