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

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,020
Members
448,939
Latest member
Leon Leenders

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
Back
Top