+ Reply to Thread
Results 1 to 6 of 6

UPC Check Digit - UPCs that start with Zero

  1. #1
    Forum Contributor
    Join Date
    02-27-2007
    Posts
    156

    UPC Check Digit - UPCs that start with Zero

    I have a column of 10 digit numbers that I need to calculate the UPC Code.. They are 10 digit because Excel drops the leading zero...

    1722913969 is an example that should would technically be 01722913969

    There are also some that are 11 digits already that do not have a leading 0

    What I need to do is have a forumula that will calculate the check digit and concatenate them together. There are lots of them posted. I just don't see any of them handling the leading 0 that gets dropped by Excel.

    This is what the result should be 017229139695

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: UPC Check Digit - UPCs that start with Zero

    Format the cells as text or format custom as "00000000000"

    If that doesnt work for you, suggest you upload a sample workbook showing what you have and what you want
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    02-27-2007
    Posts
    156

    Re: UPC Check Digit - UPCs that start with Zero

    Spreadsheet is attached...

    Column B represents the UPC without a check digit.
    If it is 10 characters it needs a leading zero and then the check digit calculation
    If it is 11 characters it just needs the check digit.
    If it is less than 10 or more than 11 nothing should happen to it as there is something else going on.
    Attached Files Attached Files

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

    Re: UPC Check Digit - UPCs that start with Zero

    Hi,

    Am I missing something or have you yet to tell us the algorithm that you're using to generate the Check Digit?

    There are hundreds of such algorithms for this kind of thing.

    Regards
    Click * below if this answer helped

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

  5. #5
    Forum Contributor
    Join Date
    02-27-2007
    Posts
    156

    Re: UPC Check Digit - UPCs that start with Zero

    I tried this one but could not get it to work.
    Please Login or Register  to view this content.

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

    Re: UPC Check Digit - UPCs that start with Zero

    That means nothing, I'm afraid.

    There must be an algorithm which you've been instructed to use? Or at least you have an idea of the logic behind how you would like the Check Digit to be generated?

    Regards

+ 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. How to add check digit to 6 digit number string...
    By unclejemima in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-18-2013, 04:19 PM
  2. 2 excel files for inventory, have upc's on one, need to add UPCs to master appropriately
    By geniustream in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2012, 05:41 PM
  3. Macro to force format and check barcode check digit
    By Code Flunkie in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-02-2009, 10:27 AM
  4. Replies: 3
    Last Post: 05-07-2009, 10:37 AM
  5. [SOLVED] Mod-10 Check Digit
    By Union70 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-24-2005, 08:06 PM

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