+ Reply to Thread
Results 1 to 13 of 13

Split cells into the following columns

  1. #1
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Split cells into the following columns

    Hey my friends,

    I need your help to write formula to split/extract data in the given cells.
    In the attached file sheet1, there are five matches in the list. From A to D column.
    In second worksheet, you can see that desired result with the data in these cells is extracted into cells along the columns from F to O.

    Here how it goes:
    A column cell is extracted in terms of first "." in the cell. Left from the point into F, right from "." into G, if there is no "." in the cell like A3, it will be error.
    B column cell is split into H and I in terms of date and hour.
    C column cell, team names will be spllitted into columns J and K in terms of " - "
    D coloun cell is score. The score out of the paranthesis is final score of the match, it will be N and O column. Halftime score is the first score before the comma "," in the paranthesis. If there is no paranthesis in the cell like D2, halftime score colums L and M, it will be error. If there is a score inside paranthesis, but there is no "," like D3, again it will be error.

    Thanks for your interest guys. Waiting for your replys.
    Attached Files Attached Files
    Last edited by aaaaa34; 10-08-2019 at 08:46 AM. Reason: attached file fixed

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Split cells into the following columns

    B4 contains / already. This is different to the rest of your dates in column B.

    Is column B a mixture of dates separated by . and / ???
    Or is a this a typo?
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Split cells into the following columns

    Please try at
    F2
    =TRIM(LEFT(SUBSTITUTE(A2,".",REPT(" ",40)),40))

    G2
    =MID(SUBSTITUTE(A2,F2,),3,40)

    H2
    =IFERROR(INT(B2),--SUBSTITUTE(LEFT(B2,FIND(" ",B2)),".","/"))

    I2
    =IFERROR(--MID(D2,FIND("(",D2)+1,1),0)
    Attached Files Attached Files

  4. #4
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Re: Split cells into the following columns

    Quote Originally Posted by Special-K View Post
    B4 contains / already. This is different to the rest of your dates in column B.
    Is column B a mixture of dates separated by . and / ???
    Or is a this a typo?
    sorry for the confusion, it should be only "." , not any "/".
    I made all B column format "Text" and updated attached file in post #1.
    I have changed even filename because it looks like others in forum didn't like my thread title too.

  5. #5
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Re: Split cells into the following columns

    All formulas working properly in attached file, @Bo_Ry
    I only wish that L2, L3, M2, M3 cells could stay empty like cells G4 and G6,
    Halftime score is the first score before the comma inside paranthesis D2 doesnt have any score inside the paranthesis. D3 has a score inside the paranhesis but there is only one score inside it, no any score else seperated with a comma.

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Split cells into the following columns

    Please try at
    L2
    =IF(LEN(D2)>10,--MID(D2,FIND("(",D2)+1,1),"")

    M2
    =IF(LEN(D2)>10,--MID(D2,FIND("(",D2)+3,1),"")

  7. #7
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Re: Split cells into the following columns

    Half-time formula worked perfectly too @Bo_Ry , thank you so much
    But I failed dealing with full time (90 mins) scores
    Because league matches finish in 90 mins and they have only 1st half and 2nd half goals inside paranthesis such as 3:1 (0:1,3:0).
    But, cup matches or qualifying matches can go for extra time (15mins X 2 half) and even penalties such as 5:4 (0:1,1:0,0:0,0:0,4:3)
    So now I'm attaching new workbook to form fulltime score columns neglecting extra time or penalties scores, including existing halftime formula.
    In this manner, 5:4 (0:1,1:0,0:0,0:0,4:3) shows that 90 mins of this game ended 1-1. so fulltime columns should be shaped like this.
    Please have a check the file and desired result worksheet, you will understand it with examples.
    Attached Files Attached Files
    Last edited by aaaaa34; 10-18-2019 at 06:02 AM. Reason: attached file fixed

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Split cells into the following columns

    Assume that score is one digit

    H2
    =IFERROR(MID(D2,FIND("(",D2)+1,1)+IFERROR(MID(D2,FIND(",",D2)+1,1),0),--LEFT(D2))

    I2
    =IFERROR(MID(D2,FIND("(",D2)+3,1)+IFERROR(MID(D2,FIND(",",D2)+3,1),0),--LEFT(D2))

  9. #9
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Re: Split cells into the following columns

    Yes @Bo_Ry , I have applied your latest formulas in attached file below.
    But, two digits scores in halftime or fulltime mislead.

    How can we solve it? Do you advice me to try VBA?
    Attached Files Attached Files

  10. #10
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Re: Split cells into the following columns

    any update?

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Split cells into the following columns

    On Sayfa2 try the following modifications of Bo_Ry's formulas:
    1. E2 and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    2. F2 and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3. J2 and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    4. K2 and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  12. #12
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Re: Split cells into the following columns

    Despite I explained the case terribly and mistaken since beginning, @Bo_Ry never gave up helping me.
    and your latest edit in his formula working great @JeteMc
    Despite thread is getting older, you became interested in and solved it.
    Marking it as solved.
    Perfect. Thank you, thanks a lot bro.

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Split cells into the following columns

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. Split data in cells and copy into specific columns
    By chrisellis250 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-11-2019, 06:06 AM
  2. [SOLVED] Need to split one column into two columns based on the number of words per cells
    By terryhenderson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-26-2018, 03:42 AM
  3. [SOLVED] Split Cells data into specific columns
    By AaruJaan in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 07-01-2017, 08:01 AM
  4. Replies: 8
    Last Post: 04-13-2017, 05:36 AM
  5. Split cells into multiple columns by carriage return
    By taylorcharley in forum Excel General
    Replies: 3
    Last Post: 11-12-2016, 07:59 AM
  6. [SOLVED] Macro attempting to split cells containing multiple co-ordinates into appropriate columns
    By Ethanrholt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-06-2014, 10:56 AM
  7. split data into 2 cells, text to columns
    By ericc2728 in forum Excel General
    Replies: 7
    Last Post: 02-26-2009, 03:03 PM

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