+ Reply to Thread
Results 1 to 5 of 5

Need formulas to extract data based on special characters

  1. #1
    Registered User
    Join Date
    08-27-2014
    Location
    USA
    MS-Off Ver
    2010 Home and Business
    Posts
    3

    Question Need formulas to extract data based on special characters

    I need formulas to extract some data from a barcode scan based on a special character in the barcode data. The barcode data contains:
    {Work Order}_{Roll}_{Arbor}_{Part Number}_{Date}_{Qty}

    Here is what a typical barcode looks like when it is decoded to legible text:
    50045784_35_12_ AC20438400TB008_120514_16.00

    However, some barcodes decode like this:
    ___NA02188360AA000_111414_25.00 (three leading underscores as these parts do not have work orders, rolls or arbors.)

    or this:
    50046927___RF05063510GE000_043015_386.00 (three underscores between the work order and the part number since these parts have no roll or arbor)



    For inventory purposes, I need to extract to three separate cells the part number the date and the qty:
    AC20438400TB008 120514 16.00
    NA02188360AA000 111414 25.00
    RF05063510GE000 043015 386.00

    Can anybody help me with the formulas I need?

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need formulas to extract data based on special characters

    You get better help on your topic, if you add an excel file without confidential information.

    Forummembers don't want to reproduce your file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Need formulas to extract data based on special characters

    if you have your data in A1 then try the following

    =TRIM(MID(SUBSTITUTE($A1,"_",REPT(" ",256)),256*3+1,256))
    =TRIM(MID(SUBSTITUTE($A1,"_",REPT(" ",256)),256*4+1,256))
    =TRIM(MID(SUBSTITUTE($A1,"_",REPT(" ",256)),256*5+1,256))+0
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Registered User
    Join Date
    08-27-2014
    Location
    USA
    MS-Off Ver
    2010 Home and Business
    Posts
    3

    Re: Need formulas to extract data based on special characters

    oeldere,

    My apologies. I was in the process of creating a few sample rows in a spreadsheet to attach when I saw nflsales reply. His response solved my problem.

  5. #5
    Registered User
    Join Date
    08-27-2014
    Location
    USA
    MS-Off Ver
    2010 Home and Business
    Posts
    3

    Re: Need formulas to extract data based on special characters

    nflsales,

    Thank you so much! That was exactly what I needed. It worked with any configuration I threw at it. I did leave off the "+0" on the third formula as I do need the two decimals.

+ 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. Charting data values with special characters
    By xcl27 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 03-09-2015, 04:09 AM
  2. [SOLVED] Extract data in special way
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-23-2014, 07:13 AM
  3. Extract special characters from a string
    By Nadine74 in forum Excel General
    Replies: 3
    Last Post: 04-17-2014, 01:41 PM
  4. [SOLVED] Regex Replacing Formulas: Issue with Special Characters
    By k64 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-24-2014, 10:17 AM
  5. Special Characters in formulas
    By obrien2003 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-06-2007, 01:16 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