Thread: SUM of Hex?
View Single Post
  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Fri, 8 Jul 2005 08:34:01 -0700, "GeeB"
wrote:

OK...this is probably a very simple answer, but I can't seem to find it...

I have a column of hexidecimal numbers (0x20, 0x40, etc.) that I want to
simply present the SUM of that colum in Hex. I've been unable to get the SUM
function to do this. What am I missing?


SUM adds numbers. HEX representations are strings so cannot be added by the
SUM worksheet function.

You could either write a custom VBA user defined function or use a helper
column:

With your data in A1:A5, in the above format, enter a formula

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

in B1 and drag down to B5.

In some cell, but the formula:

=DEC2HEX(SUM(B1:B5))


--ron