[Solved]: HEX2DEC Not Working in Excel

Get FREE Advanced Excel Exercises with Solutions!

Microsoft Excel comes with the handy use of multiple functions to make your work quicker. The HEX2DEC function is an essential function if you are looking for a faster way to convert hexadecimal numbers to decimal numbers. But sometimes it won’t work because of some limitations. In this article, I am sharing with you about solving the problem of HEX2DEC not working in Excel. Stay tuned!

Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.

Introduction to HEX2DEC Function in Excel

Let’s get introduced to the HEX2DEC function of Excel first.

  • Objective

The HEX2DEC function is used to convert a hexadecimal (16 radix) number that is applied into it to a decimal number.

  • Syntax
  • Argument
Argument Required/Optional Value
number Required The number of items. It should be of 10 characters or less than 10 characters.
  • Output

Converts a hexadecimal number to decimal.

2 Easy Ways to Solve HEX2DEC Not Working in Excel

The problem of malfunction of HEX2DEC may encountered for several reasons. In the following, I have described 2 simple and effective ways to solve HEX2DEC not working in Excel. I will discuss them here with proper illustrations. Let’s check them now!

1. When Number of Characters Up to 10

The HEX2DEC function in Excel will return #NUM! Error if it finds more than 10 characters in the argument. Let’s say, we have a dataset of some hexadecimal numbers with more than 10 characters just like the following image.

Here, we will try to apply the HEX2DEC function.

Now, type the below formula in cell (C5), press ENTER and drag the “Fill Handle” tool down to copy the formula below.



  • B5 = Applied hexadecimal number

excel hex2dec not working when number of character up to 10

You will get to see #NUM! Error in the output column as it has more than 10 characters.

excel hex2dec not working when number of character up to 10

In order to solve this problem, just convert the hexadecimal numbers to 10 or less than 10 characters to get the proper output in your hands. Simple isn’t it?

excel hex2dec not working when number of character up to 10

So, in order to make the function work properly, make sure that your text got digits less than 10.

Read More: How to Convert Decimal Number to Hexadecimal (Hex) in Excel

2. Removing Characters

Sometimes your data may got too many unwanted characters with the hexadecimal numbers. See the image below.

Here, our dataset includes some unnecessary characters. These type of characters leads to unwanted results.

In that case, if we apply the below formula just like the previous method we will get #NUM! Error for the cells.



  • B5 = Applied hexadecimal number

Remove characters to solve excel hex2dec not working

We want to fix that problem. To solve this just remove the unwanted characters from the numbers and you will see the HEX2DEC function is working properly.

Remove characters to solve excel hex2dec not working

Just follow the suggestion above and you will be able to overcome this problem.

Read More: Format Hex Numbers in Excel with Leading Zero (with Quick Steps)

Things to Remember

  • The HEX2DEC function will also return error if the provided number is not a hexadecimal number. So, ensure that your input value is hexadecimal or not.


In this article, I have tried to cover almost all the methods to solve the problem of HEX2DEC not working in Excel. Take a tour of the practice workbook and download the file to practice by yourself. I hope you find it helpful. Please inform us in the comment section about your experience. We, the ExcelDemy team, are always responsive to your queries. Stay tuned and keep learning.

Happy Excelling!

Related Articles

Wasim Akram
Wasim Akram

Hi! my name is Wasim Akram. I am a graduate in mechanical engineering from Ahsanullah University of Science & Technology. I am passionate about learning new things and writing articles. I write article about Microsoft Excel and it's my favourite thing to do.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF