+ Reply to Thread
Results 1 to 4 of 4

extracting text left of second hyphen

  1. #1
    Registered User
    Join Date
    12-11-2012
    Location
    Grand Rapids, MI
    MS-Off Ver
    Excel 2003
    Posts
    2

    extracting text left of second hyphen

    I have a karaoke song list (8000 songs) which is stupidly contained in one column in excel. it is formatted as follows

    folder-#-title-artist

    I need to separate into three columns

    Folder-#, Title, Artist

    I have figured out how to extract the title and artist from the string.
    I have found many formulas for grabbing text before and after hyphens, but not for extracting text before a second hyphen.

    EXAMPLE

    CURRENTLY
    BK-01 - A MILLION WAYS TO FALL - BOBBY UK

    NEED

    BK-01

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: extracting text left of second hyphen

    For all the text before the second -

    =MID(A1,1,FIND("-",A1,FIND("-",A1)+1)-1)
    Gary's Student

  3. #3
    Registered User
    Join Date
    12-11-2012
    Location
    Grand Rapids, MI
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: extracting text left of second hyphen

    PERFECT. thanks Jakob

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: extracting text left of second hyphen

    Another way..

    Please Login or Register  to view this content.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

+ 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