Thanks:  0
Likes:  0

# Thread: Does anyone know how to use excel to calculate Cheksum

1. On 2002-03-23 15:15, GUS wrote:
Tommy,

I am sorry I am not to smart as you guys.
Question..
How I use the string =dec2hex(HEX2DEC(100)-HEX2DEC(RIGHT(dec2hex(HEX2DEC(mid(A1;2;2))+HEX2DEC(mid(A1;4;2))+HEX2DEC(mid(A1;6;2))+HEX2DEC(mid(A1;8;2))+HEX2DEC(mid(A1 ;10;2))+HEX2DEC(mid(A1;12;2))+HEX2DEC(mid(A1;14;2)));2)))

In a macro in a module.. ?

Because when I type =dec2hex(HEX2DEC(100)-HEX2DEC(RIGHT(dec2hex(HEX2DEC(mid(A1;2;2))+HEX2DEC(mid(A1;4;2))+HEX2DEC(mid(A1;6;2))+HEX2DEC(mid(A1;8;2))+HEX2DEC(mid(A1 ;10;2))+HEX2DEC(mid(A1;12;2))+HEX2DEC(mid(A1;14;2)));2)))
on a given cell, it didn't work I did add the Analysis toll Pack which is also selected in add in module.
I have in Cell A1 022CE5003B7B3C and I typed the formula given in A2. Which should give the checksum from A1.

Best regards
Gus

[ This Message was edited by: GUS on 2002-03-23 16:04 ]
Hi Gus and Tommy:
How about looking at the differences in the Danish and the U.S. versions of Excel.
In Tommy's formula, the argument separator is ; -- U.S. version uses the , as argument separator.
I have not put Tommy's formula in the worksheet yet, but I guess this is it! Now befor e I say anything more I better go check that formula out with the , as the argument separator!

2. Hi Gus and Tommy:
I did replace the ; as argument separator with a , and Tommy's formula did result in 1E

Great Job T O M M Y !

3. Thanks Yogi
You're absolutely right.
In Denmark the default setting is ; for list seperator and , as decimalsign.

I just didn't convert it.

regards Tommy

4. You all were right, even do it I have to do some changes.. I learn something new from you Tommy B.

Muchas Gracias Amigo..

Best regards
GUS

5. ## Re: Does anyone know how to use excel to calculate Cheksum

I know this is an old thread, but it is relevant to a current problem I am having.

In cell A1, I have GPRMC,164237.615,A,3857.7725,N,09437.6296,W,0.85,159.46,221117,,,A

In cell B1 I have =dec2hex(HEX2DEC(100)-HEX2DEC(RIGHT(dec2hex(HEX2DEC(mid(A1,2,2))+HEX2DEC(mid(A1,4,2))+HEX2DEC(mid(A1,6,2))+HEX2DEC(mid(A1,8,2))+HEX2DEC(mid(A1 ,10,2))+HEX2DEC(mid(A1,12,2))+HEX2DEC(mid(A1,14,2))),2)))

#NUM ! is the answer that I get, and I know the result should be "73"

Can someone please tell me what I did wrong?

6. ## Re: Does anyone know how to use excel to calculate Cheksum

Not sure how to edit my post above.

Using Gus' original example of ":0300300002337A1E", I did get an answer of 1E

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•