# The BIN2HEX Function: Syntax and Examples The BIN2HEX is an Excel engineering function that converts a binary number to a hexadecimal number. It is one of the oldest Excel functions, so it can be used even with Excel 2003.

Note: Other conversion functions are BIN2DEC (binary to decimal), BIN2OCT (binary to octal) and HEX2BIN (hexadecimal to binary)

## Syntax

```  BIN2HEX(number, [places])
```

## Required Arguments

[number]: The binary number that you want to convert. Note that there’s a limit of 10 characters i.e 10 bits.

## Optional Arguments

[places]: How many characters should the output contain. If omitted, minimum number of characters necessary will be used.

## BIN2HEX Function Examples

`BIN2HEX(1) = 1`
`BIN2HEX(10, 7) = 0000002`
`BIN2HEX(11, 1) = 3`
`BIN2HEX(11010101) = D5 `

## Common Errors

Most common errors with this function are:

### #VALUE

• [places] argument is non-numeric

### #NUM

• The number is either longer than 10 characters or is not a binary number.
• [places] argument is less than 0 or more than 10
• The output needs more numbers than the [places] argument would allow. I.e if you’ve set it to 1 but the resulting hexadecimal is D5.

## How to Reverse BIN2HEX?

The easiest way to reverse it is to use a built-in Excel function- HEX2BIN. It works the same way.

## More Examples and Use Cases

We don’t have any use cases for this formula on our website at this moment but will link them below once we have. Stay tuned!