+ Reply to Thread
Results 1 to 4 of 4

UPC Check digit calculator

  1. #1
    Forum Contributor
    Join Date
    07-16-2009
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2013
    Posts
    114

    Unhappy UPC Check digit calculator

    Hi,

    a while back I had some help on this forum with a macro to check the check digit of a barcode. The macro works perfectly except for the fact that I realized my formula is wrong for the 13 digit barcode. I realized that if the barcode has an even number of characters then the odd digits are summed and multiplied by 3 and the even numbers are just summed. if the barcode has an odd number of characters then the even digits should be summed and multiplied by 3 and the odd numbers should be summed. Unfortunately I don't know how to correct the macro for this, so any help would be much appreciated.

    Thanks,

    Chris


    Please Login or Register  to view this content.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: UPC Check digit calculator

    Hello Code Flunkie,

    Perhaps this macro will help you. It returns checksums for both UPC-A and EAN-13 codes.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-16-2013
    Location
    Japan
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: UPC Check digit calculator

    Quote Originally Posted by Code Flunkie View Post
    Hi,

    a while back I had some help on this forum with a macro to check the check digit of a barcode. The macro works perfectly except for the fact that I realized my formula is wrong for the 13 digit barcode. I realized that if the UPC-A barcode has an even number of characters then the odd digits are summed and multiplied by 3 and the even numbers are just summed. if the barcode has an odd number of characters then the even digits should be summed and multiplied by 3 and the odd numbers should be summed. Unfortunately I don't know how to correct the macro for this, so any help would be much appreciated.

    Thanks,

    Chris

    The checksum of UPC-A and EAN-13 barcode is based on a modulo 10 calculation and there are detailed steps at http://www.barcodeisland.com/ean13.phtml.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: UPC Check digit calculator

    Hello caryfloric,

    You do realize that this post is more than a year old. I appreciate your additional information to this post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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