+ Reply to Thread
Results 1 to 6 of 6

Extracting Specific Text

  1. #1
    Registered User
    Join Date
    07-06-2011
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    11

    Extracting Specific Text

    I posted a topic similar to this yesterday evening, and received such a fantastic response that I'm back with another question.

    So, I have a column full of cells that look like this

    Three velvet lilies with bead and sequin centers lie 5" long on a 2 1/2" salon clip. Colors: Black, Blush, Winter White <img src="/PDGimages/swatch-calla-lily.jpg" alt="calla lily swatch" />

    Unfortunately, the descriptive text, list of colors and HTML code need to be extracted individually so they can be put in their own column.

    Last night I was taught how to remove the HTML by using a formula which targeted the <'s which open and close the code, which worked great. But now, I need to extract from Colors: through that opening carrot, and once it's in its own column have a way to easily delete it from the existing one.

    Is this possible?
    Last edited by jdh3; 07-11-2011 at 12:52 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extracting Specific Text

    If your text is in A1, then in B1 enter:

    =TRIM(MID(A1,FIND("Colors:",A1),FIND("<",A1)-FIND("Colors",A1)-1))

    then in C1 enter:

    =TRIM(SUBSTITUTE(A1,B1,""))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-06-2011
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Extracting Specific Text

    Works great, thanks a ton!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extracting Specific Text

    Great. If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  5. #5
    Registered User
    Join Date
    07-06-2011
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Extracting Specific Text

    What if the <img tag is not there, how would I have it copy from "Colors: onward?

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extracting Specific Text

    Try:

    =TRIM(MID(A1,FIND("Colors:",A1),IF(ISNUMBER(FIND("<",A1)),FIND("<",A1)-FIND("Colors",A1)-1,255)))

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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