+ Reply to Thread
Results 1 to 6 of 6

Split Date and Text

  1. #1
    Registered User
    Join Date
    07-11-2007
    Posts
    25

    Split Date and Text

    Hi, i have about 300 cells in column A that contain data like:

    KILMARNOCK SEPTEMBER 26/9/05
    WINKINGTON OCTOBER 3/10/05

    Theres no commas to seperate them, but i need to keep the name, eg Kilmarnock in cell A. And put the date into cell B. The name of the month is not necessary to keep.

    Help, im stumped!!

  2. #2
    Forum Contributor
    Join Date
    11-23-2005
    Location
    Perth, Australia
    Posts
    218

    Split Date and Text

    Have you tried the data menu->text to columns and then choosing the space character as the delimiter ?

  3. #3
    Registered User
    Join Date
    07-11-2007
    Posts
    25
    I have but as the space in between the words and date differs for almost every cell, its impossible to set a line to split them, if you see what i mean.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,727
    You shouldn’t need to set a line. Choose the “Delimited” option (not “Fixed Width”) and then under “Delimiters” tick the “space” box.

    If you can’t make that work you could consider using formulas to extract the data you need.

    If the text is in cell A1 use this formula to extract the name

    =LEFT(A1,FIND(" ",A1)-1)

    and for the date

    =TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",10)),10))

  5. #5
    Forum Contributor corinereyes's Avatar
    Join Date
    12-02-2003
    Location
    Philippines
    MS-Off Ver
    MS Excel 2016
    Posts
    520

    Split text in a cell

    Hello,

    If your format of words does not change in every cell, below formula would work.

    B1: =LEFT(A1,FIND(" ",A1)-1) and on C1: =RIGHT(A1,LEN(A1)-FIND("*",SUBSTITUTE(A1," ","*",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))). Select B1:C1 and copy the formula for the rest of the rows.

    If what you meant by the space in between the words and date differs from every cell like this --> KILMAR[space]NOCK[space]SEPTEMEBER[space]26/09/2005. We have to do different approach.

    Try to copy this text on A5, KILMAR NOCK SEPTEMBER 26/9/05, on B5: =LEFT(A5,FIND(" ",A5)-1)&IF(ISERR(MID(A5,FIND(" ",A5)+1,IF(ISERR(FIND(" ",A5,FIND(" ",A5)+1)), FIND(" ",A5),FIND(" ",A5,FIND(" ",A5)+1))-FIND(" ",A5)-1)),"",MID(A5,FIND(" ",A5)+ 1,IF(ISERR(FIND(" ",A5,FIND(" ",A5)+1)),FIND(" ",A5),FIND(" ",A5,FIND(" ",A5)+1))-FIND(" ",A5)-1))

    on c5: just copy the formula from c1 and change the cell references to c5.

    Regards,

    Corine

    Corine

  6. #6
    Registered User
    Join Date
    07-11-2007
    Posts
    25
    Wow. Thats some serious formula! I'm sorted now guys, cheers!

+ 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