+ Reply to Thread
Results 1 to 11 of 11

Need to extract specific data from barcode scans into spreadsheet

  1. #1
    Registered User
    Join Date
    06-07-2017
    Location
    Columbus, Mississippi
    MS-Off Ver
    2010
    Posts
    3

    Need to extract specific data from barcode scans into spreadsheet

    I have 3 different types of barcode scans in a spreadsheet and need to extract specific characters from the scans for comparisons.
    for example, one scan is --[)>+06:1J0000103189170605001:P1048059-00-E:Q6:K7700000393:5K1:4K00080:3QEA+#
    I just need excel to return the P1048059-00-E for a comparison
    but my other type of scan shows up as P76750 5RA1A
    Just need to extract 76750 from it for comparison

    Ideas?

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Need to extract specific data from barcode scans into spreadsheet

    Two different sources and two different results.

    --[)>+06:1J0000103189170605001:P1048059-00-E:Q6:K7700000393:5K1:4K00080:3QEA+#
    P1048059-00-E

    P76750 5RA1A
    76750

    IMHO you can try regular expression but maybe there is another way

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Need to extract specific data from barcode scans into spreadsheet

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution. You refer to 3 types of data and showed only 2. What is the third one? ONE example is insufficient to see what pattersn there are in your real data. If all 3 sorts of codes can occur in a column of data, say so. If they are in different columns, say so and show them in spearate columns in your sample file.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Need to extract specific data from barcode scans into spreadsheet

    So... this works for your first one:

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE(A1,":","",1),":",REPT(" ",100)),100,100))

    IF & ONLY IF it was representative of your actual data (I'll bet that it wasn't representative...)

  5. #5
    Registered User
    Join Date
    06-07-2017
    Location
    Columbus, Mississippi
    MS-Off Ver
    2010
    Posts
    3

    Re: Need to extract specific data from barcode scans into spreadsheet

    adding some example scans of what we use under scans.xlsx
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Need to extract specific data from barcode scans into spreadsheet

    More examples of the one in row 7, please....

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Need to extract specific data from barcode scans into spreadsheet

    Do ALL of the shorter ones ALWAYS begin with P ???

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Need to extract specific data from barcode scans into spreadsheet

    This works for the shorter ones:
    =IFERROR((MID(A5,2,SEARCH(" ",A5)-1)+0),TRIM(LOOKUP(99^99,--("0"&MID(A5,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A5&"0123456789")),ROW(1:10000)))))+0)

    For the longer one... are the number of characters before the target number always the same?

    Does the target string ALWAYS occur between the first P and the first K? Is the target string always 12 characters long???

    It'd also be helpful if you answered ALL of the questions from my previous post....
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 06-07-2017 at 01:37 PM.

  9. #9
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Need to extract specific data from barcode scans into spreadsheet

    Try this
    Enter in B5 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  10. #10
    Registered User
    Join Date
    06-07-2017
    Location
    Columbus, Mississippi
    MS-Off Ver
    2010
    Posts
    3

    Re: Need to extract specific data from barcode scans into spreadsheet

    Yes, the short ones always begin with the letter "P"
    And as far as I can get with my shipping department examples, all the long ones begin with the exact same character string before the number we need. We don't see a lot of the long numbers in our monthly shipping, so I'm having a hard time getting more examples.
    And yes, it always occurs between the first "P" and "K" those are string markers for our customer, the number always is inside them.

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Need to extract specific data from barcode scans into spreadsheet

    OK. right, so.

    This (monster) does the lot:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    test thoroughly...

    Incidentally- do check Alkey's offering out (I haven't...). He's the best on the Forum for this sort of Q.
    Attached Files Attached Files

+ 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] Automatically update stock when barcode scans into worksheet
    By Stevis2016 in forum Excel General
    Replies: 9
    Last Post: 07-07-2016, 06:38 AM
  2. Barcode scanning, very simple request to go to new line when user scans 'finish'
    By mintag in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-04-2014, 03:15 AM
  3. Macro to check barcode scans
    By importriders in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2013, 02:30 PM
  4. how to Extract specific data from excel spreadsheet?
    By roopa m j in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-17-2013, 12:03 AM
  5. Barcode scans into excel
    By ReedT in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-10-2012, 05:29 PM
  6. Replies: 5
    Last Post: 01-13-2012, 04:04 PM
  7. extract specific data from a file into spreadsheet
    By darkhorse4321 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-10-2011, 04:56 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