Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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? |
#2
![]() |
|||
|
|||
![]()
You may need a helper column where you convert from HEX to DEC (using
function HEXTODEC) and then sum that column. Convert back to HEX using DECTOHEX function. "GeeB" wrote in message ... 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? |
#3
![]() |
|||
|
|||
![]()
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 |
#4
![]() |
|||
|
|||
![]()
Thanks for the info...when I use your first example, I get a #NAME? error.
I have the Analysis Toolpak installed and enabled. "Ron Rosenfeld" wrote: 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 |
#5
![]() |
|||
|
|||
![]()
On Fri, 8 Jul 2005 11:53:03 -0700, "GeeB"
wrote: Thanks for the info...when I use your first example, I get a #NAME? error. I have the Analysis Toolpak installed and enabled. Copy and paste the exact formula you are using; and also copy/paste the exact data it is working on. Let's see if we can figure this out. --ron |
#6
![]() |
|||
|
|||
![]()
Sure, here's the basic column:
A1: 0x20 A2: 0x1 A3: 0x80 A5: =hex2dec(MID,A1,3,255)) After entering the formula, the #NAME? appears in A5 I've also tried removing the '0x' portion of the #'s with the same result. I'm running Excel 2003 Thanks for your assistance. Copy and paste the exact formula you are using; and also copy/paste the exact data it is working on. Let's see if we can figure this out. --ron |
#7
![]() |
|||
|
|||
![]()
I made a typo in my previous post...
This: A5: =hex2dec(MID,A1,3,255)) Is actually this in my spreadsheet: A5: =hex2dec(MID(A1,3,255)) Again, just a typo in the post. I used the correct formula in Excel and get the error as noted. "GeeB" wrote: Sure, here's the basic column: A1: 0x20 A2: 0x1 A3: 0x80 A5: =hex2dec(MID,A1,3,255)) After entering the formula, the #NAME? appears in A5 I've also tried removing the '0x' portion of the #'s with the same result. I'm running Excel 2003 Thanks for your assistance. Copy and paste the exact formula you are using; and also copy/paste the exact data it is working on. Let's see if we can figure this out. --ron |
#8
![]() |
|||
|
|||
![]()
I have Excel 2000. No =hex2dec() in there, indeed it gives a #NAME error.
For myself I solved this with a simple DLL: http://www.geocities.com/smplprgrsrc/files/HEX2DEC.zip Probably not according to all conventions, but it works fine for me. "GeeB" schreef in bericht ... 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? |
#9
![]() |
|||
|
|||
![]()
The hyperlink is invalid. Are you sure it is correct?
"moi" wrote: I have Excel 2000. No =hex2dec() in there, indeed it gives a #NAME error. For myself I solved this with a simple DLL: http://www.geocities.com/smplprgrsrc/files/HEX2DEC.zip Probably not according to all conventions, but it works fine for me. "GeeB" schreef in bericht ... 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? |
#10
![]() |
|||
|
|||
![]()
Thanks, that was quite stupid.
The link will work now. "GeeB" schreef in bericht ... The hyperlink is invalid. Are you sure it is correct? "moi" wrote: I have Excel 2000. No =hex2dec() in there, indeed it gives a #NAME error. For myself I solved this with a simple DLL: http://www.geocities.com/smplprgrsrc/files/HEX2DEC.zip Probably not according to all conventions, but it works fine for me. "GeeB" schreef in bericht ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|