MS Excel: How to use the BIN2HEX Function (WS)
This Excel tutorial explains how to use the Excel BIN2HEX function with syntax and examples.
Description
The Microsoft Excel BIN2HEX function converts a binary number to a hexadecimal number.
The BIN2HEX function is a built-in function in Excel that is categorized as an Engineering Function. It can be used as a worksheet function (WS) in Excel. As a worksheet function, the BIN2HEX function can be entered as part of a formula in a cell of a worksheet.
Syntax
The syntax for the BIN2HEX function in Microsoft Excel is:
BIN2HEX( binary_number, [places] )
Parameters or Arguments
- binary_number
- The binary number that you wish to convert to a hexadecimal number.
- places
- Optional. It is the number of characters to use when displaying the results. It will pad the front of the result with 0's to fill the characters, if necessary.
Returns
The BIN2HEX function returns a string/text value.
Applies To
- Excel for Office 365, Excel 2019, Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007
Type of Function
- Worksheet function (WS)
Example (as Worksheet Function)
Let's look at some Excel BIN2HEX function examples and explore how to use the BIN2HEX function as a worksheet function in Microsoft Excel:
Based on the Excel spreadsheet above, the following BIN2HEX examples would return:
=BIN2HEX(A1) Result: "3B" =BIN2HEX(111011) Result: "3B" =BIN2HEX(A2) Result: "14" =BIN2HEX(10100) Result: "14" =BIN2HEX(111111) Result: "3F" =BIN2HEX(111111, 4) Result: "003F" =BIN2HEX(111111, 5) Result: "0003F"
Advertisements