+ Reply to Thread
Results 1 to 3 of 3

How to Extract Text Before Second Instance of a Symbol

  1. #1
    Registered User
    Join Date
    08-04-2009
    Location
    Flushing, NY
    MS-Off Ver
    Excel 2007
    Posts
    1

    How to Extract Text Before Second Instance of a Symbol

    Hi,

    I have a column of cells with text like this:
    Pour-Over Coffee Urn, electric, single 3 gallon cap., brews in 1 lb. batches, side mounted control panel, s/s construction

    I am trying to copy all text before the second or third instance of the comma into an adjacent cell.

    I've been using: =LEFT(C548,(FIND(",",C548,1)-1))
    But that gives me only the text before the first comma. How do I change which instance of the comma in my formula?

    Thank you!!!!

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

    Re: How to Extract Text Before Second Instance of a Symbol

    Try something like:

    =LEFT(C5,FIND("^^",SUBSTITUTE(C5,",","^^",2))-1)

    where the 2 represents the comma instance number
    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
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,321

    Re: How to Extract Text Before Second Instance of a Symbol

    if you do it this way
    =LEFT(A1,FIND("^",SUBSTITUTE(A1,",","^",C1))-1)
    then put which , you want to return it from in c1 (or just replace c1 with the number)
    Last edited by martindwilson; 08-04-2009 at 02:30 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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