Can I use HEX2DEC with cell references vs. numbers?

G

Guest

I want to use HEX2DEC to convert hex numbers to decimal. The HEX2DEC
function seems to only work with number. If I can use the function on a
number by referencing it's cell then I could convert a large number of hex
numbers to decimal.
 
G

Guest

Would it be something other than =HEX2DEC(A1)? That should convert the
hexadecimal value located in the cell A1 to decimal value. I'm not quite
sure what you mean if it's something other than that. But it should work to
just put in the cell reference.
 
R

Ron Rosenfeld

I want to use HEX2DEC to convert hex numbers to decimal. The HEX2DEC
function seems to only work with number. If I can use the function on a
number by referencing it's cell then I could convert a large number of hex
numbers to decimal.

=HEX2DEC(A1)

works fine here, with a HEX number in A1.

What, exactly, are you doing?


--ron
 
G

Guest

Dave,

You are absolutely correct. I just tried some dummy data & it worked. My
intial problem seemed to be that the numbers I tried to convert had leading
characters (i.e., 0x004803) that the function did not seem to like. I'll
just have to only copy the characters I need and leave out the leading 0x00
stuff. Still pretty manual but at least the function works.

Thanks for your help.
 
G

Guest

Cool.

An easy way to get that x out, would be go to Data->Text to Columns, choose
delimited, and select the "Other" box and type in "x" for the delimiter.
 
G

Guest

Ron,

I'm trying to convert some hex numbers that are in a text file to decimal.
I have been copying the text out of the text file & pasting it into an Excel
spreadsheet. The format of the hex numbers includes leading 0x0 in front of
the hex numbers. The function did not seem to work w/ the leading characters.
 
G

Guest

Dave,

Whoo Hoo! You da man!

Thanks very much.

David Billigmeier said:
Cool.

An easy way to get that x out, would be go to Data->Text to Columns, choose
delimited, and select the "Other" box and type in "x" for the delimiter.
 
R

Ron Rosenfeld

Well, if they all have the leading 0x0 you could use:

=hex2dec(MID(A1,FIND("x",A1)+1,255))



Ron,

I'm trying to convert some hex numbers that are in a text file to decimal.
I have been copying the text out of the text file & pasting it into an Excel
spreadsheet. The format of the hex numbers includes leading 0x0 in front of
the hex numbers. The function did not seem to work w/ the leading characters.


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