Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Extract Text Between Multiple Characters

  1. #1
    New Member
    Join Date
    Jan 2010
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Extract Text Between Multiple Characters

    Hi, I've tried using the search function to find the answer on my own, but I wasn't able to solve my problem.

    If someone is able to help me out I'd really appreciate it. I don't know VB so an excel formula is what I really need.

    Here is what I want to do. I need to extract

    Here is an example:
    3M EMI Copper Foil Shielding Tape 1181, 2 in x 18 yd, (50,80 mm x 1,5 m), 5 per case

    I need to get the string before the first comma "3M(TM) EMI Copper Foil Shielding Tape 1181".

    And also the data after the first comma and before the last comma. Often I can have 4-5 (or more) commas. So I'd need to get " 2 in x 18 yd, (50,80 mm x 1,5 m)" out of that.

    Thanks so much!

  2. #2
    MrExcel MVP Jonmo1's Avatar
    Join Date
    Oct 2006
    Location
    Bryan, TX
    Posts
    44,054
    Post Thanks / Like
    Mentioned
    19 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Extract Text Between Multiple Characters

    Best solution is probably without formula or VBA

    Make sure there are several emtpy columns available to the right of the data, 1 for each comma (minus the column holding the data)
    So if the most commas there can be in the string is say 6, you would want 5 empty columns to the right.
    Highlight the column of Data,
    Click Data - Text To Columns
    Select Deliminated - Click Next
    Put a check on "Comma"
    Click Finish.
    Use the MrExcel HTML Maker to post nicely formatted tables in your forum posts.
    Find a link in post number 31

    The more we learn, and the better we get at our trade, the easier it becomes to overlook the obvious.

    Life moves pretty fast. If you don't stop and look around once in a while, you could miss it.
    Ferris Bueller A.K.A. John Hughes, 1986

  3. #3
    New Member
    Join Date
    Jan 2010
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Extract Text Between Multiple Characters

    It seems I like to make things much more complicated than I need to, lol.

    Thank you for the suggestion, this is what I was looking for.

  4. #4
    Board Regular
    Join Date
    Mar 2007
    Location
    Indianapolis, IN
    Posts
    104
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Extract Text Between Multiple Characters

    Something like this may work too.

    =LEFT(A1,FIND(",",A1)-1)

  5. #5
    Board Regular
    Join Date
    Mar 2007
    Location
    Indianapolis, IN
    Posts
    104
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Extract Text Between Multiple Characters

    Nevermind, I completely misread the request.


Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •