+ Reply to Thread
Results 1 to 5 of 5

Extracting text from a cell before the THIRD dash

  1. #1
    Registered User
    Join Date
    01-28-2014
    Location
    Dunedin, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    50

    Extracting text from a cell before the THIRD dash

    Hi - I need to extract data before the third dash - for example, I have this in cell E2 - "Mowing & Edging - Park Turf - Amenity Turf - December - Mow 1 of 5", however I just want to bring back "Mowing & Edging - Park Turf - Amenity Turf".

    I've been finding information on bringing back information before or after a dash, but I can't seem to manipulate the formula to work for bringing back text before the third dash!

    Help gratefully appreciated!

    Cheers
    Emma

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Extracting text from a cell before the THIRD dash

    hi emma. try:
    =LEFT(A1,FIND("^",SUBSTITUTE(A1," -","^",3))-1)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    01-28-2014
    Location
    Dunedin, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Extracting text from a cell before the THIRD dash

    @benishiryo - you are amazing! That worked perfectly, thank you so much

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Extracting text from a cell before the THIRD dash

    Bens formula replaces the third occurrence of the dash "-" with a "^"

    Ben can then use the find function to find the location of the "^" in your text.

    Anything Left of that is what you are after.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  5. #5
    Registered User
    Join Date
    01-28-2014
    Location
    Dunedin, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Extracting text from a cell before the THIRD dash

    Thanks mehmetcik

+ 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. Extracting text from cell
    By robtuby in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-18-2014, 01:55 PM
  2. Help extracting text from a cell
    By SEMMatt in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-26-2014, 08:02 PM
  3. Space between text and dash
    By tantcu in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-04-2013, 01:36 PM
  4. Extracting text from a cell
    By rbd66 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-28-2013, 01:09 AM
  5. Nw how do i extract text from a text seperated by a dash.
    By all4excel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-26-2007, 05:30 AM
  6. Text after a dash
    By Steve in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-25-2006, 11:10 PM
  7. understanding dash dash in a excel formula
    By ldebner in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-31-2005, 10:05 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