HEX Numbers, Hex to Bin

nickgreening

New Member
Joined
Sep 29, 2006
Messages
12
I would like to convert a Hex number to Binary number. When i convert ff it works correctly, but when i convert E97 i get an message saying #¡NUM!
i think this is because th number E97 is seen by excel as text and not a number, but FF is okay! don't understand!!! i am using Excel 2003 SP2, thanks :confused:
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
Hi Nick

From the Excel Help~:

If number is negative, it cannot be less than FFFFFFFE00, and if number is positive, it cannot be greater than 1FF.

So the number is too big for HexToBin.

Best regards

Richard
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
You can use this formula to convert positive HEX to binary accurately up to 7FFF

=(DEC2BIN(HEX2DEC(B2)/64)&DEC2BIN(MOD(HEX2DEC(B2),64),6))+0

where your hex number is in A1

edit:"simplified" formula
 

Forum statistics

Threads
1,136,926
Messages
5,678,606
Members
419,775
Latest member
joh93

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top