+ Reply to Thread
Results 1 to 6 of 6

Extracting Barcode information from variable length barcode w/ alphanumeric characters

  1. #1
    Registered User
    Join Date
    02-02-2021
    Location
    New york
    MS-Off Ver
    Excel 16.45
    Posts
    4

    Extracting Barcode information from variable length barcode w/ alphanumeric characters

    Hello All,

    Please bear with me on my first question on this forum.

    your assistance is greatly appreciated!

    ---

    I assist in managing merchandise for a fashion photography studio. We track the received products against a document to confirm whether they will be part of a photography shoot.

    I
    • scan barcode into a worksheet (worksheet-SCAN / Column A).
    • I want to strip the leading numbers and populate Column B (need help)
    • Referencing Column B, split into its respective product-ID (6 digits), color code (3-alphanumeric characters), size-ID (3-alphanumeric characters), which are placed in their own columns (need some help)


    Example barcodes:

    1560000413551QN7S
    36000394127QCR34B
    1440000394029QB5S
    7040000412543QF8S

    My challenge is:
    • Extracting the MAIN BARCODE (bold) by removing the leading numbers (italics), which are variable length (sometimes 3 or 4 zeros; (MAIN BARCODE always starts after a 0/zero))
    • Size-ID is also a variable of length of character 1,2, or 3 characters - S or OS or 34B


    Please see attached Workbook for the example.

    Thank you in advance for your consideration!
    Last edited by Xanderer; 02-03-2021 at 02:43 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Extracting Barcode information from variable length barcode w/ alphanumeric characters

    So you need to delete everything up to the last zero.

    To do that you must know how many zeros you have.

    Lets say your number is in cell A1

    1. So the number of Zeros is given by =LEN(A1)-LEN(SUBSTITUTE(A1,"0",""))

    So now we have to flag the last Zero so we can find it in the string

    2. =Substitute(A1,"0","@",Pos) Where Pos is the number of Zero given by formula 1.

    So =Substitute(A1,"0","@",LEN(A1)-LEN(SUBSTITUTE(A1,"0","")))

    So now we need to Find the Position of the @ in our formula.

    3. =FIND("@",SUBSTITUTE(A1,"0","@",LEN(A1)-LEN(SUBSTITUTE(A1,"0",""))))

    Finally we need to extract the Text to the right of the @

    4. =MID(A1,FIND("@",SUBSTITUTE(A1,"0","@",LEN(A1)-LEN(SUBSTITUTE(A1,"0",""))))+1,99)
    Last edited by mehmetcik; 02-02-2021 at 09:04 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    02-02-2021
    Location
    New york
    MS-Off Ver
    Excel 16.45
    Posts
    4

    Re: Extracting Barcode information from variable length barcode w/ alphanumeric characters

    Hello mehmetcik,

    Firstly, thank you for taking a moment to respond! Your solution definitely got me that much closer to a final solution.

    While I am trying to relay the scenario I am experiencing from your provided formulas, this forum's reply keeps saying I am not allowed to forward links, vids etc. because I am new. but I am not doing any of those things :L

    Will figure it out and follow up with the output I am getting using your formulas...

  4. #4
    Registered User
    Join Date
    02-02-2021
    Location
    New york
    MS-Off Ver
    Excel 16.45
    Posts
    4

    Re: Extracting Barcode information from variable length barcode w/ alphanumeric characters

    In using the formula you provided, it affects the zeros within the main barcode

    (please see attached excel document Template-SCAN_IN-CLIENT-SHOTLIST_MANIFEST_NAME_Edit.xlsx
    for further reference as I cannot seem to paste the results in this chat window)

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Extracting Barcode information from variable length barcode w/ alphanumeric characters

    Formula for B2 =MID(A2,FIND("@",SUBSTITUTE(A2,"0","@",MIN(LEN(A2)-LEN(SUBSTITUTE(A2,"0","")),4)))+1,99)


    A15 and A16 end up with leading Zeros.
    Formula for B15 =IF(LEFT(MID(A15,FIND("@",SUBSTITUTE(A15,"0","@",MIN(LEN(A15)-LEN(SUBSTITUTE(A15,"0","")),4)))+1,99),1)="0",MID(MID(A15,FIND("@",SUBSTITUTE(A15,"0","@",MIN(LEN(A2)-LEN(SUBSTITUTE(A15,"0","")),4)))+1,99),2,99),MID(A15,FIND("@",SUBSTITUTE(A15,"0","@",MIN(LEN(A15)-LEN(SUBSTITUTE(A15,"0","")),4)))+1,99))
    Last edited by mehmetcik; 02-04-2021 at 06:34 PM.

  6. #6
    Registered User
    Join Date
    02-02-2021
    Location
    New york
    MS-Off Ver
    Excel 16.45
    Posts
    4

    Re: Extracting Barcode information from variable length barcode w/ alphanumeric characters

    Thank you very much for your effort on this!

+ 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. Can VBA send information to Barcode Zebra printer?
    By samihaddad2014 in forum Excel General
    Replies: 0
    Last Post: 05-19-2020, 03:08 PM
  2. Barcode with no Barcode Font
    By murray83 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-25-2018, 11:21 AM
  3. Scan a barcode, print information for a match
    By JamesTurnham in forum Excel General
    Replies: 0
    Last Post: 11-13-2017, 11:38 AM
  4. Replies: 0
    Last Post: 03-17-2017, 10:52 AM
  5. Excel Barcode multi cell information?
    By resurectedvikin in forum Excel General
    Replies: 0
    Last Post: 10-28-2014, 09:14 AM
  6. Replies: 1
    Last Post: 12-18-2011, 12:32 PM
  7. Replies: 1
    Last Post: 05-12-2005, 07: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