Converting Hexadecimal number to floating point decimal number

F

Fifi

I am looking for an Excel code that will automaitically convert a
hexadecimal number in a cell (like 0X00 0X0f 0X7b 0Xa1 0x39) into int
decimal and put the result in another cell without changing th
original hex number. Any help is appreciated
 
J

JE McGimpsey

one way:

=HEX2DEC(MID(A1,3,255))

HEX2DEC() is part of the Analysis Toolpack Addin (Tools/Add-ins...)

Note that if you have actual hexadecimal numbers (e.g., a1, 0f), you
don't need the MID() function. 0x is not part of a hex number, but is
rather an indicator that by convention means that what follows is hex.

Note also that 255 is just a big number. For your examples, 2 would work
just as well.
 
R

Ron Rosenfeld

I am looking for an Excel code that will automaitically convert an
hexadecimal number in a cell (like 0X00 0X0f 0X7b 0Xa1 0x39) into into
decimal and put the result in another cell without changing the
original hex number. Any help is appreciated.

Look at HEX2DEC worksheet function.

Depending on your expected range of numbers, it may be useful.

If you need a greater range than it will handle, post back.
--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top