[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!


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
=HEX2DEC(number)
  • 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.

=HEX2DEC(B5)

Here,

  • 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.


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.

=HEX2DEC(B5)

Here,

  • 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.


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.

Download Practice Workbook

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


Conclusion

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.

Happy Excelling!


<< Go Back to | Excel Number System Conversion | Excel for Math | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Wasim Akram
Wasim Akram

Wasim Akram holds a BSc degree in Industrial and Production Engineering from Ahsanullah University of Science and Technology. Over the past 2 years, he has been actively contributing to the ExcelDemy project, where he has authored more than 150 articles. Now, he is working as an Excel VBA and Content Developer. He likes learning new things about Microsoft Office, especially Excel VBA, Power Query, Data Analysis, and Excel Statistics. He is also very interested in machine learning and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo