+ Reply to Thread
Results 1 to 8 of 8

Hexadecimal Checksum formula.

  1. #1
    Registered User
    Join Date
    11-06-2016
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    15

    Hexadecimal Checksum formula.

    Hi Guys,

    Firstly I have to say this Forum ROCKS!!!!

    Thank you all for your help today and I promise it will be my last question.

    I need some help in calculating a checksum as I am very over my head on this one.

    Firstly the below message is in hexadecimal

    F1,57,01,00,B7

    B7 is the check sum.

    So an example that I have seen is:

    F1+57+01+00 ( Hexadecimal)

    = 149 - 100 = 49 ( not sure if this is converted to decimal however F1= 0, 57 = 87, 01 = 1, 00 = 0 so total = 88 not 149??)

    then 100 - 49 = B7

    Apparently the above is known as 2's compliment.

    The other part of the problem is these messages can vary in length.

    any help or bum steer in the right direction would be appreciated.

    thanks
    Daniel

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Hexadecimal Checksum formula.

    F1 in hexadecimal is 241 not 0
    57 does indeed equal 87 (5 * 16 + 7)
    01 is 1
    00 is 0

    241+57+1+0=329
    The next power of 2 up from 329 is 512
    512 - 329 = 183
    183 = B7 hexadecimal
    Last edited by Special-K; 11-07-2016 at 07:45 AM.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Hexadecimal Checksum formula.

    Hi,

    I'd love to help, but I think you yourself need to be a bit clearer about the algorithm to begin with. Reading your post, I'm still not at all sure how the checksum should be arrived at.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Hexadecimal Checksum formula.

    Quote Originally Posted by danieljgor View Post
    Thank you all for your help today and I promise it will be my last question.
    Sad to hear that

    Here, try this UDF named CHECKSUM
    Attached Files Attached Files

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Hexadecimal Checksum formula.

    Revised to Special-K Checksumm:
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-06-2016
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    15

    Re: Hexadecimal Checksum formula.

    Hi Guys,

    Just to clarify the below, Everybody on here has been amazing and a wealth of knowledge.....

    I left out " for today".

    Quote Originally Posted by danieljgor View Post

    Thank you all for your help today and I promise it will be my last question.
    Sad to hear that

    Thanks AGAIN
    Daniel

    Last edited by danieljgor; 11-07-2016 at 08:50 AM.

  7. #7
    Registered User
    Join Date
    11-06-2016
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    15

    Re: Hexadecimal Checksum formula.

    [QUOTE=Special-K;4517360]F1 in hexadecimal is 241 not 0

    Interesting, I usually use the excel formula =hex2dec to convert hexadecimals into decimals and it returned a 0 but you are spot on =241!!

    Thank you.
    Attached Images Attached Images

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Hexadecimal Checksum formula.

    F1 is the Cell not value

    =HEX2DEC("F1")

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] One Digit Checksum
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-27-2014, 09:45 PM
  2. Generate MD5 Checksum
    By vibs_us in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-06-2008, 02:25 PM
  3. Table Checksum
    By astrikor in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-16-2008, 10:11 AM
  4. Figuring out checksum formula..
    By djvice in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-28-2007, 07:54 PM
  5. Calculate Checksum
    By Safi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-23-2006, 09:40 AM
  6. [SOLVED] Calculate Checksum
    By Safi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2006, 03:40 AM
  7. Formula for converting Binary to Hexadecimal
    By Teraawete Tekena in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-23-2006, 03:20 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1