+ Reply to Thread
Results 1 to 17 of 17

Splitting data in cell to multiple columns

Hybrid View

  1. #1
    Registered User
    Join Date
    06-02-2017
    Location
    Amsterdam
    MS-Off Ver
    MS office 2016 for MAC
    Posts
    15

    Splitting data in cell to multiple columns

    Hi,

    I have this excel file with in one cell data that I want to split in multiple columns, I will attached the file (the divider is <BR><BR>) .

    Can anyone help me to figure this out please.

    Kind regards,
    Nordin
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    11-06-2007
    Posts
    123

    Re: Splitting data in cell to multiple columns

    Hi Nordin

    How/Where are you trying to split the data?

    I have split it by the spaces - see attached.

    Go to Data > Text to Columns > Delimited > Space (select what you want to split by)- use "Other" to make a selection by something not listed (insert what it is in the box)

    Thanks

    Cortlyn
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-02-2017
    Location
    Amsterdam
    MS-Off Ver
    MS office 2016 for MAC
    Posts
    15

    Re: Splitting data in cell to multiple columns

    Thanks Cortlyn tried that already, but like I mentioned in my original request, I want to split the the data by the divider as mentioned above so every time this divider occurs I want the data generate a new column with the data that's following. If I do other I can't enter the full divider "<BR><BR>.

  4. #4
    Forum Contributor
    Join Date
    11-06-2007
    Posts
    123

    Re: Splitting data in cell to multiple columns

    Hi

    You can also try (only if the data is consistent and always the same length.) to use the Text to Columns "Fixed Width" and put the markers in front and end of <BR><BR> (see attached).

    Thanks

    Cortlyn
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Splitting data in cell to multiple columns

    In B2, copied across and down:

    =TRIM(MID(SUBSTITUTE("<br><br>"&$A2,"<br><br>",REPT(" ",125)),125*COLUMNS($A:A),125))

    Since you're in NL, you'll need ; instead of ,
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 06-02-2017 at 07:36 AM.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Splitting data in cell to multiple columns

    If yo are interested in formula only
    ARRy formula in K3, then drag across

    =IFERROR(MID("<br><br>"&$A3,SMALL(IF(MID("<br><br>"&$A3,ROW(INDIRECT("1:"&LEN("<br><br>"&$A3)-1)),8)="<br><br>",ROW(INDIRECT("1:"&LEN("<br><br>"&$A3)-1)),""),INT((COLUMNS($K3:K3)+1)/2))+IF(ISODD(COLUMNS($K3:K3)),8,0),IF(ISODD(COLUMNS($K3:K3)),14,IF(ISERROR(SMALL(IF(MID("<br><br>"&$A3,ROW(INDIRECT("1:"&LEN("<br><br>"&$A3)-1)),8)="<br><br>",ROW(INDIRECT("1:"&LEN("<br><br>"&$A3)-1)),""),INT((COLUMNS($K3:K3)+1)/2)+1)),0,8))),"")

    ARRAY formula is used

    To enter ARRAY formula
    Paste the formula
    Press F2
    Press Ctrl+Shift+Enter keys together.
    formula will be covered with{} brackets by excel.

  7. #7
    Registered User
    Join Date
    06-02-2017
    Location
    Amsterdam
    MS-Off Ver
    MS office 2016 for MAC
    Posts
    15

    Re: Splitting data in cell to multiple columns

    Hi kvsrinivasamurthy,

    Can you please place this into my worksheet it seems to not work when i try it?
    Last edited by jeffreybrown; 06-02-2017 at 12:45 PM. Reason: Removed unnecessary quote!

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Splitting data in cell to multiple columns

    I suggest you try the formula that I suggested. It's much simpler!!

  9. #9
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Splitting data in cell to multiple columns

    File attached.
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Splitting data in cell to multiple columns

    I have slightly changed Glenn Kennedy's formula to get data as in your file.TThis is more presice an very simple.
    In B2 , then drag across

    =TRIM(MID(SUBSTITUTE($A2,"<br><br>",REPT(" ",125)&"<br><br>"&REPT(" ",125)),1+125*(COLUMNS($A:A)-1),125))
    Attached Files Attached Files

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Splitting data in cell to multiple columns

    I really do not believe that the OP wants the <br><br> bit returned. But we'll see.

  12. #12
    Registered User
    Join Date
    06-02-2017
    Location
    Amsterdam
    MS-Off Ver
    MS office 2016 for MAC
    Posts
    15

    Re: Splitting data in cell to multiple columns

    Thanks Glenn,

    I have used your formula and that works best for me, I have now a different problem I have attached a new file maybe you can help me further.
    The file I have has more cells with combined data the divider always remains "<br><br>" no the challenge is in the column that holds the date info, when I put in your formula it separates them correctly but the it returns the formatting as text and it seems that I can format that back to date format?
    Next to that is that in the "Sales order" and "Invoices" column I want to formula to return only the numbers if possible same goes for invoice amount I only want to return the number.

    Can you please have a look and let me know what I am doing wrong?

    Thanks in advance.

    Kind regards,
    Nordin
    Attached Files Attached Files

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Splitting data in cell to multiple columns

    You don't need 17,000 rows to make your point. for a few weeks I'm using a slow, metered connection. Almost always 10-20 rows is enough. In a column with numbers/dates ( I used column F)

    =IFERROR(--TRIM(MID(SUBSTITUTE("<br><br>"&$F2,"<br><br>",REPT(" ",125)),125*COLUMNS($A:A),125)),"")
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    06-02-2017
    Location
    Amsterdam
    MS-Off Ver
    MS office 2016 for MAC
    Posts
    15

    Re: Splitting data in cell to multiple columns

    Thanks Glenn,

    This works perfect sorry for the huge file, by the way what about the other questions in my mail? about the invoice numbers how do I get rid of the word "Invoice #" in front of the number? and in the invoice amount column how to get rid of the word "EUR" behind the amount?

    Thanks in advance,
    Nordin

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Splitting data in cell to multiple columns

    I spotted that bit afterwards. So , you just need to customise the formula slightly, to suit specific columns. Here it is again. In the case of column A, your data look like:

    SO #29388<br><br>SO #29390

    You have "SO #", as well as the <br> thing.

    =IFERROR(--TRIM(MID(SUBSTITUTE("<br><br>"&SUBSTITUTE($A2,"SO #",""),"<br><br>",REPT(" ",125)),125*COLUMNS($A:A),125)),"")

    The green bit substitutes SO # with nothing.
    The red bit turns the text back into a number. Blanks are turned into #VALUE errors
    The blue bit replaces the #VALUE errors with a blank
    The black bit is just as before.





    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    06-02-2017
    Location
    Amsterdam
    MS-Off Ver
    MS office 2016 for MAC
    Posts
    15

    Re: Splitting data in cell to multiple columns

    Thank you Glenn, much appreciated.

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Splitting data in cell to multiple columns

    No problem...

+ 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. Splitting text in a single cell across multiple columns
    By gasdesign in forum Excel General
    Replies: 4
    Last Post: 04-03-2016, 03:28 PM
  2. Splitting a list of data into multiple columns
    By PeterGriffin in forum Excel General
    Replies: 9
    Last Post: 11-14-2015, 03:50 PM
  3. Splitting a list of data into multiple columns
    By achhun02 in forum Excel General
    Replies: 1
    Last Post: 03-18-2015, 04:51 PM
  4. Splitting a list of data into multiple columns
    By ozge in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2013, 06:17 PM
  5. Splitting multiple entries in single cell into multiple columns
    By David_Mitchell in forum Excel General
    Replies: 12
    Last Post: 01-24-2013, 06:57 AM
  6. [SOLVED] Excel 2007 : splitting data into multiple columns
    By SubtleFudge in forum Excel General
    Replies: 3
    Last Post: 07-17-2012, 02:21 PM
  7. splitting multiple lines in one cell into columns
    By m4rty5miff in forum Excel General
    Replies: 1
    Last Post: 02-10-2012, 12:15 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