Excel Function : BIN2HEX

Download now!

Excel Function : BIN2HEX




Converts a binary number to hexadecimal

Microsoft Excel Reference Page


Syntax and Description of the BIN2HEX Excel Function

I have the following in Excel: =BIN2HEX(D3*256+C3) This takes a certain number and converts to HEX. I'm trying to write a VBA macro to do this for me automatically. This is as far as I've got: Private Sub ConvertBinaryHex() Range("H3").Value = "=BIN2HEX(D3*256+C3)" End Sub I get the following error:

Unable to get the BIN2HEX property of the WorksheetFunction class

About BIN2HEX Excel Function

BIN2HEX(number, places) The BIN2HEX function converts a binary number to hexadecimal. The number argument is the binary number you want to convert. The places argument is the number of characters to use.