In this post, you will learn about BIN2HEX function, its usage, syntax and how to use it in your excel spreadsheet.
BIN2HEX Function in Excel
The BIN2HEX function in Excel converts a binary number to its hexadecimal values.
Similar to the BIN2DEC, the input numbers must contain only zeros and ones and it is restricted to only 10 characters, and if the value crosses the 10 character limit the function will return a “#NUM!” Error.
=BIN2HEX (number, [places])
- number – The binary number you want to convert to hexadecimal.
- places – [optional] when left out or neglected, it uses the least number of characters required to represent the number, or else it combines the result with zeros up to the specified number of places.
How to use BIN2HEX in Excel Worksheet?
Using this function in a WS is simple; all you need to do is enter the function as a formula of the cell in the formula bar.
Take a look at the given example
The above numbers are the binary version of some Hexadecimal numbers. To find out the Hexadecimal numbers, Enter the given binary numbers in column A and in Column B, enter the following formula
Here, A1 refers to the cell name or the cell address. Repeat the same to the other cells and you will get the Hexadecimal value of the binary values.
In the Cell A6, you can find that the corresponding value is #NUM! error, that is due to the presence of more characters than the prescribed limit of 10.