How to Use “DEC2HEX Function” in MS Excel 365? – [With Examples]
Tags: dec2hexfunctioninexc, excelfunctions
Published: 2020-08-14 11:25:44

---
title: How to Use “DEC2HEX Function” in MS Excel 365? – [With Examples]
published: true
date: 2020-08-14 06:19:08 UTC
tags: DEC2HEXFunctioninExc,ExcelFunctions
canonical_url: https://geekexcel.com/how-to-use-dec2hex-function-in-ms-excel-365-with-examples/
---

## DEC2HEX Function in Excel:

In this article, you will learn how to use **DEC2HEX Function in Excel 365** using its basic syntax, explanation, and examples. Let’s see them below!! Get official version of **MS Excel** from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)

## Jump To:

- [**DEC2HEX – Function Explanation**](#1)
- [**Syntax**](#2)
- [**Examples**](#3)
- [**Verdict**](#4)

## DEC2HEX – Function Explanation:

- **DEC2HEX**  **Function** is mainly used to **convert the decimal numbers into hexadecimal numbers**.
- This function is just opposite to **HEX2DEC Function**.

## Syntax:

**=DEC2HEX(number, [places])**

### Argument Description:

**Number** – The decimal integer that you want to convert to hexadecimal value.

**Places** – It is optional. It is used for padding the output value with leading zeros. If you don’t mention the places, it returns the exact value of the input.

### **Note:**

- If either a number or places are non-numeric, it returns **#VALUE!** Error.
- If you give a negative number to places, it will show **#NUM!** Error value.
- If the input number is less than -549,755,813,888 or greater than 549,755,813,887, it returns **#NUM!** Error.

## Examples:

Let’s see some examples to make it clear.

### Example 1:

- Refer to the below image.
- You can see the input value ( **negative number** ) in the cell **A6 ** and its places value is **2.**
- It will return a hexadecimal value in the active cell **C6**.

![DEC2HEX Conversion](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/08/1-20.png)<figcaption id="caption-attachment-11619">DEC2HEX Conversion</figcaption>

### Example 2:

- If you give a negative number to places, it will show **#NUM!** Error value.
- If the input number is less than -549,755,813,888 or greater than 549,755,813,887, it returns **#NUM!** Error.

![Example 2](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/08/2-18.png)<figcaption id="caption-attachment-11620">Example 2</figcaption>

### Example 3:

- If either a number or places are non-numeric, it returns **#VALUE!** Error.

![Example 3](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/08/3-16.png)<figcaption id="caption-attachment-11621">Example 3</figcaption>

## Verdict:

In the above article, you can understand the **DEC2HEX Function in Excel 365** with its syntax, explanation, and examples. Leave your **feedback** in the comment section. Thanks for visiting **[Geek Excel.](https://geekexcel.com/)** Keep Learning!!

### Similar Functions:

- [**DEC2BIN Function**](https://geekexcel.com/how-to-use-dec2bin-function-in-excel-365-with-examples/)
- [**DEC2OCT Function**](https://geekexcel.com/how-to-use-dec2oct-function-in-excel-365-with-examples/)

### Read Also:

- [How to Use BIN2DEC Function in Excel 365? (With Examples)](https://geekexcel.com/how-to-use-bin2dec-function-in-excel-365-with-examples/)
- [How to Use PHONETIC Function in Microsoft Excel 365?](https://geekexcel.com/how-to-use-phonetic-function-in-microsoft-excel-365/)