Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Converting to Hexadecimal.
by Allen Wyatt
(last updated June 14, 2018)
If you do any programming, you know how important hexadecimal numbers are. Hexadecimal numbers are used to represent values that can be easily understood by both humans and programming languages. In the hexadecimal numbering system, each digit can vary between 0 and F. Thus, 0 through 9 are the same as in our decimal numbering system, and A through F are converted to 10 through 15 in decimal.
How can Excel help with hexadecimal numbers? It includes a worksheet function that allows you to easily convert a number from decimal to hexadecimal. For instance, let's say you have a decimal value in E3. If you wanted to know the hexadecimal equivalent, you would use the following:
If the value in E3 was 123, the result of the above formula would be 7B. The DEC2HEX worksheet function can be used to convert any decimal values between -549,755,813,888 and 549,755,813,887.
Once the conversion is done, the value in the cell is considered text. This means that you cannot use the results of DEC2HEX in a numeric formula.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12384) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Converting to Hexadecimal.
Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!
Some users have reported problems using the EOMONTH function in later versions of Excel, beginning with Excel 2007. The ...Discover More
Normally the VLOOKUP function returns a value, and if it can't return a value it returns a zero. Here's how you can use ...Discover More
Want to return more than a value when doing a lookup? Here are a couple of ways to do it by adding an IF clause to your ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.