+ Reply to Thread
Results 1 to 8 of 8

Excel Question - TExt to Column delemma

Hybrid View

  1. #1
    Registered User
    Join Date
    06-21-2013
    Location
    New Jersey
    MS-Off Ver
    2007
    Posts
    4

    Excel Question - TExt to Column delemma

    Hi,
    First post. I'm using Excel 2007 and have a question. I have it mostly figured out but stuck on one thing.

    I collect a lot of audio concerts and have them on multiple disk (about 20-25 per disk.)
    I am trying to make an excel list of the shows so I can see which I have so I don't wind up with duplicates.

    I know I can go into CMD and type DIR /B > test.txt or something similar. then open that file in excel. I don't have
    an issue with that. I can get a nice list of files in COLUMN A.

    So, I highlight COLUMN A and hit TEXT to COLUMN and this is where the trouble starts to brew.

    COLUMN A has a list similar to this

    Pink Floyd - 1971-12-22 San Francisco
    Pink Floyd - 1980-10-21 New York
    Rolling Stones - 2005-10-15 Philadelphia
    Styx - 1982-09-17 Boston

    ect....

    What I want to do is have the band name in one column. The date in the next and finally the city in the third.
    I find I can use a SEPERATOR of - but then it also seperates the date into 3 columns and doesn't separate the city.

    Any idea how to do this besides hand typing them?
    Any help is appreciated as I have over 1,000 shows and hand separating them all is anti-what I want to do LOL.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,108

    Re: Excel Question - TExt to Column delemma

    will you always have 4 dashes before the city

    =LEFT(D14, FIND(CHAR(7),SUBSTITUTE(D14,"-",CHAR(7),4)))[/B]

    so the first "-" does it always have a space before if so

    =LEFT(D14, FIND("-",D14,FIND("-",D14))-1)
    will extract the name

    then we need to extract the date
    so again is the first - always followed by a -
    and what does the 1-9 dates look like

    2010-1-1 - is that January 1st
    2010-01-01

    =LEFT(A1, FIND(CHAR(7),SUBSTITUTE(A1,"-",CHAR(7),4))+2)
    will move 2 characters to the right of the -
    and we could use the Mid function to extract that info

    =Mid(A1, FIND(CHAR(7),SUBSTITUTE(D14,"-",CHAR(7),4))+3), Len(A1))
    will extract the place

    BUT I need to know the format is OK

    can you post a sample file with the data in column A
    Last edited by etaf; 06-21-2013 at 02:57 PM.

  3. #3
    Registered User
    Join Date
    06-21-2013
    Location
    New Jersey
    MS-Off Ver
    2007
    Posts
    4

    Re: Excel Question - TExt to Column delemma

    posted file below.
    Last edited by jamieb1970; 06-21-2013 at 03:02 PM. Reason: IE stinks had to use CHROME to upload it

  4. #4
    Registered User
    Join Date
    06-21-2013
    Location
    New Jersey
    MS-Off Ver
    2007
    Posts
    4

    Re: Excel Question - TExt to Column delemma

    had to use CHROME to upload
    Attached Files Attached Files

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,108

    Re: Excel Question - TExt to Column delemma

    so that worked - apart from 1 row
    Iron Maiden 2013-06-05 Paris

    which does not have the - between the name and date

    see attached

    once done

    I would then copy the range B1 to D??
    copy
    paste special
    Value
    so then the formulas are replaced and you have text to do what you like with
    and can delete column A with no effect
    Attached Files Attached Files
    Last edited by etaf; 06-21-2013 at 04:20 PM.

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,108

    Re: Excel Question - TExt to Column delemma

    so in cell
    B1
    =LEFT(A1, FIND(CHAR(7),SUBSTITUTE(A1,"-",CHAR(7),1))-2)

    C1
    =MID(A1, FIND(CHAR(7),SUBSTITUTE(A1,"-",CHAR(7),1))+2,10)
    but wont work if the dates are
    2013/1/1
    in which case I would need to add some additional code to capture that

    D1
    =MID(A1, FIND(CHAR(7),SUBSTITUTE(A1,"-",CHAR(7),3))+3,256)

  7. #7
    Registered User
    Join Date
    06-21-2013
    Location
    New Jersey
    MS-Off Ver
    2007
    Posts
    4

    Re: Excel Question - TExt to Column delemma

    Cool. Thank you very much.

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Excel Question - TExt to Column delemma

    The enclosed should do what you want.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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