Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Dave
 
Posts: n/a
Default adding hexadecimal numbers

Hi,
As the subject states, how do I add together cells containing hex numbers. I
tried
the following...

A1 contains 0f
a2 contains 0f
a3 contains = a1 + a2
result #VALUE!

I know that it knows the cells could be hex because if I do =hex2dec(a1) in
another cell it converts it. Is there anyway in Excel to explicitly set the
number type of a cell?

Regards,
Dave.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Dave Peterson
 
Posts: n/a
Default adding hexadecimal numbers

As long as your numbers fit in that =hex2dec() and =dec2hex() ranges:

=DEC2HEX(HEX2DEC(A1)+HEX2DEC(A2))

I don't know of anyway of using a custom format to display hex.

Dave wrote:

Hi,
As the subject states, how do I add together cells containing hex numbers. I
tried
the following...

A1 contains 0f
a2 contains 0f
a3 contains = a1 + a2
result #VALUE!

I know that it knows the cells could be hex because if I do =hex2dec(a1) in
another cell it converts it. Is there anyway in Excel to explicitly set the
number type of a cell?

Regards,
Dave.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Bernard Liengme
 
Posts: n/a
Default adding hexadecimal numbers

You have nearly answered your own question:
=DEC2HEX(HEX2DEC(A1)+HEX2DEC(A2))

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Dave" wrote in message
...
Hi,
As the subject states, how do I add together cells containing hex numbers.
I
tried
the following...

A1 contains 0f
a2 contains 0f
a3 contains = a1 + a2
result #VALUE!

I know that it knows the cells could be hex because if I do =hex2dec(a1)
in
another cell it converts it. Is there anyway in Excel to explicitly set
the
number type of a cell?

Regards,
Dave.



  #4   Report Post  
Posted to microsoft.public.excel.newusers
Dave
 
Posts: n/a
Default adding hexadecimal numbers

Thanks,
Thats what I did in the end. I just thought that with Excel being a big
number cruncher it would be a bit more flexible in the way you can use
numbers of a different base without having to jump through loops.

Regards,
Dave.

"Bernard Liengme" wrote:

You have nearly answered your own question:
=DEC2HEX(HEX2DEC(A1)+HEX2DEC(A2))

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Dave" wrote in message
...
Hi,
As the subject states, how do I add together cells containing hex numbers.
I
tried
the following...

A1 contains 0f
a2 contains 0f
a3 contains = a1 + a2
result #VALUE!

I know that it knows the cells could be hex because if I do =hex2dec(a1)
in
another cell it converts it. Is there anyway in Excel to explicitly set
the
number type of a cell?

Regards,
Dave.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding to a column of numbers Colleen Excel Worksheet Functions 1 January 4th 06 06:26 AM
Adding numbers in a single cell chefcasey Excel Worksheet Functions 1 September 14th 05 06:51 AM
Excel Adding duplicated numbers together JJ Joobler Excel Discussion (Misc queries) 1 January 7th 05 01:24 AM
Re What is the formula for adding multiple numbers in a cell merlin_au Excel Discussion (Misc queries) 2 January 4th 05 11:50 AM
What is the formula for adding mulitple numbers in one excel cell. Merlin_au Excel Discussion (Misc queries) 1 January 4th 05 10:50 AM


All times are GMT +1. The time now is 12:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"