PC Review


Reply
Thread Tools Rate Thread

Any way to add hex numbers?

 
 
Fan924
Guest
Posts: n/a
 
      30th Nov 2008
I am trying to optimize my checksum routine without using a macro.
Using formulas only if possible. I add up a column of hex numbers and
generates a 4 digit hex checksum. To do this, I had to generate a
decimal number in column D and then add column D. I want to remove
column D from the worksheet. Any way to add hex numbers?

checksum=RIGHT(DEC2HEX(SUM(D14098)),4)

C D
--- ---
02 2
1F 31
4E 78
02 2
1F 31
3A 58
02 2
02 2
72 114
12 18
1E 30
53 83
02 2

I tried variations of this which does not work
(SUM(HEX2DEC(C1):HEX2DEC(C4098))
 
Reply With Quote
 
 
 
 
Fan924
Guest
Posts: n/a
 
      30th Nov 2008
Never mind. I found this in a Macro I did a few years ago and forgot.
It works. Sorry

ActiveCell.FormulaR1C1 = "=RIGHT(DEC2HEX(SUM(R[0]C[-4]:R[4097]C[-4])),
4)"
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert numbers stored as text to numbers errors after loading data in jobs Microsoft Excel Programming 2 28th Mar 2007 02:57 AM
Need to reconcile numbers accounting Harlan Grove code doesn't work for negative numbers aep002@cox.net Microsoft Excel Programming 1 28th Jul 2006 07:09 AM
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Microsoft Excel Worksheet Functions 3 19th Jan 2006 09:52 AM
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Microsoft Excel Worksheet Functions 1 9th Jan 2006 01:23 PM
Change positive numbers (debits) to negative numbers (credits) =?Utf-8?B?Q2FybGEgR2lsbGVzcw==?= Microsoft Access VBA Modules 4 17th Dec 2004 06:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:26 PM.