Skip to content

How to Use Excel HEX2BIN Function?

Listen to this article.

HEX2BIN Function in Excel: Excel is a spreadsheet program that is developed for WindowsMacAndroid, and iOS. It helps to perform calculations on your PC. It offers built-in formulas and functions for performing mathematical operations. If you want to convert the hexadecimal values into binary numbers, then we suggest you use the HEX2BIN function.

Let’s see the HEX2BIN Function in Excel with its basic syntax, explanation, and examples. Get the official version of MS Excel from the following link:

Excel HEX2BIN FunctionPin
Excel HEX2BIN Function

Definition of HEX2BIN Function

  • It is one of the built-in functions in Microsoft Excel.
  • This function will convert the hexadecimal value into a binary value.
  • It is the opposite of BIN2HEX Conversion.


  • Here, you will see the syntax of the HEX2BIN function.
  • To apply this function on your spreadsheet, you must select a cell and enter the formula in the following format.
  • Once you enter the formula, click the Enter button to get the result.

=HEX2BIN(number, [places])

Syntax Definition:

  • Number – The number (hexadecimal value ) you want to convert into a binary value.
  • Places – It is optional. It is used for padding the output value with leading zeros.

1) If the input is not a valid hexadecimal number, it returns #NUM! Error.
2) If you give a negative number to places, it returns #NUM! Error.
3) If places are non-numeric values, it will show #VALUE! Error.


The following are examples of the HEX2BIN function for your reference.

  • Initially, you have to open your Excel workbook on your PC and launch the worksheet with data.
  • For instance, we have given the input values in the range B3:B6. And we will find out the binary values that are equal to the given hexadecimal values using the HEX2BIN function.
Input ValuesPin
Input Values
  • Then, you have to enter the formula in the cell as shown below to get the result.
Enter the formulaPin
Enter the formula
  • After entering the formula, you need to click the Enter button to get the output.
  • Once you get the output for the first cell, then you can drag down the cell to the below to get the result of the remaining cells.
Drag down the cellPin
Drag down the cell

Input that Causes Error

  • If the input is not a valid hexadecimal number, it returns #NUM! Error.
  • If you give a negative number to places, it returns #NUM! Error value.
NUM ErrorPin
NUM Error
  • If places is a non-numeric value, it will show #VALUE! Error.
Value ErrorPin
Value Error


In this article, you can learn the usage of the HEX2BIN Function in Excel with its syntax, description, and examples. Give your feedback in the comment section. To learn more about Excel functions, then visit our webpage,

Video Tutorial

The following video will show you how to use the HEX2BIN function in the worksheet with a few examples.

Keep Reading:


Leave a Reply

Your email address will not be published. Required fields are marked *

Share to...