+ Reply to Thread
Results 1 to 30 of 30

Split String to Column !

  1. #1
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Split String to Column !

    I had a similar question before but I have some issue now, so I am asking again.
    I have this type of Strings in Column1: A100 B200 A20 (THIS IS TEXT) or G23 H47 A234 (THIS IS ANOTHER TEXT)
    I want that the text in parenthesis FROM Column1 Strings to go in Column2
    Parenthesis are at the end of strings
    Thank you

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,851

    Re: Split String to Column !

    why not use text to columns and use the opening Parens as the delimeter?
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Split String to Column !

    use PowerQuery with split by delimiter - twice

    is that what you want?
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Split String to Column !

    I need a Formula in Column2 which EXTRACT from Column1 the text in Parenthesis

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Split String to Column !

    Ok, no problem

    Have a nice day

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,851

    Re: Split String to Column !

    Data in A1, then in B1 =RIGHT(A1,LEN(A1)-FIND("(",A1)+1)

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Split String to Column !

    ionelz are we to understand this is what you want?


    A
    B
    1
    A100 B200 A20 (THIS IS TEXT)
    A100 B200 A20 ()
    2
    G23 H47 A234 (THIS IS ANOTHER TEXT)
    G23 H47 A234 ()
    Dave

  8. #8
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: Split String to Column !

    Try this ...

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE($A1,"(",")"),")",REPT(" ",500)),COLUMNS($B1:B1)*1000-500,500))

    Copy to right.

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Split String to Column !

    Another way.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Split String to Column !

    I have attached a file.
    I just want to EXTRACT text from peranthesis where they exist.
    Just the text between, without the perenthesis
    If there are not perentehsis in String then nothing in Column 2

  11. #11
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Split String to Column !

    no any attached file

  12. #12
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Split String to Column !

    i HOPE NOW IS ATTACHED
    Attached Files Attached Files

  13. #13
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: Split String to Column !

    Use formula in post #8, or:

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE($A2,"(",")"),")",REPT(" ",500)),500,500))

  14. #14
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Split String to Column !

    it is possible very quickly with PQ
    but you said you need formula

    so attached file is only for example
    Attached Files Attached Files

  15. #15
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Split String to Column !

    Enter in B2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  16. #16
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Split String to Column !

    Another way.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  17. #17
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Split String to Column !

    Also here is how to extract multiple text within parenthesis.
    Enter formula in B2 and copy across and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D
    1
    2 WEW UUUF (TEXT 1) SDF PDR (TEXT 2) ERT DOR (TEXT 3) TEXT 1 TEXT 2 TEXT 3
    3 A100 B200 A20 (THIS IS TEXT) or G23 H47 A234 (THIS IS ANOTHER TEXT) THIS IS TEXT THIS IS ANOTHER TEXT
    4

  18. #18
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Split String to Column !

    Sorry all, but this TERRIBLE.
    Please see attached file.
    I have a String A100 B20 G30 N20 see Table 1
    The formula is to SPLIT String to coresponded Columns, so 100 go to Coulmn A, 20 goes to Column B, 30 to Column G etc....
    Works great, see again table 1

    Now I want to add a text in perenthesis in String A100 B20 G30 (BOY THIS IS A TEXT)
    The Split doesn't work anymore, text following B in () goes in Column B ....
    Sorry, is any way I can do this, see Table 2.
    Attached Files Attached Files

  19. #19
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Split String to Column !

    I hope you all understood, I want to Split String in Column A to corresponded Columns (as described in Table 1) and Text in () to go to Column ()

  20. #20
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Split String to Column !

    A lot of formulas above work great for my initial question but now I told you all ....

  21. #21
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Split String to Column !

    I the formula in Table 1 can be STOPED at (...) , not to look between() then is ok.
    I can extract (text) to a separate column with formulas from above, many of them work

  22. #22
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Split String to Column !

    This looks to be the same problem you posted here:

    https://www.excelforum.com/excel-gen...o-columns.html

  23. #23
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Split String to Column !

    Yes, but I have opened a new Thread since the question changed.
    THAT HAS BEEN SOLVED I WAS BELIEVING THAT THE THREAD IS CLOSED
    Now I have a new String like A30 C240 S100 A200 (TEXT)

  24. #24
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Split String to Column !

    VBA, if you like.
    Attached Files Attached Files

  25. #25
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Split String to Column !

    Thank you but a formula if possible would work better for me since I can not edit/debug VBA

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

    Re: Split String to Column !

    This is very confusing. Which is the active thread? Please post representative before/after data in an Excel sheet , in the active thread.
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  27. #27
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Split String to Column !

    I have open this thread.
    You pointed to another thread.
    And now you say is confusing !
    No, in attached file I have described well my question.
    One user, responded with VBA solution, so he understood !

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

    Re: Split String to Column !

    Sarcasm does not go down well. Good luck.

  29. #29
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Split String to Column !

    This works too.
    Can we Split the Column A in 2 Columns B and C ?
    A10 B15 G290 A40 C101 (THIS IS TEXT) TO BE SPLITED IN 2 COLUMNS : A10 B15 G290 A40 C101 AND THIS IS TEXT
    Text in () appear only once per string, at the end of string

    Quote Originally Posted by AlKey View Post
    Also here is how to extract multiple text within parenthesis.
    Enter formula in B2 and copy across and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D
    1
    2 WEW UUUF (TEXT 1) SDF PDR (TEXT 2) ERT DOR (TEXT 3) TEXT 1 TEXT 2 TEXT 3
    3 A100 B200 A20 (THIS IS TEXT) or G23 H47 A234 (THIS IS ANOTHER TEXT) THIS IS TEXT THIS IS ANOTHER TEXT
    4

  30. #30
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Split String to Column !

    I hope that attached file will make clarification to this Thread
    Attached Files Attached Files

+ 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. find certain text in a string and split into a new column
    By NeoDasari in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-08-2015, 03:52 PM
  2. [SOLVED] Split String at every "/" then put split string results into a multiline textbox.
    By Andrew Andromeda in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2015, 01:49 AM
  3. Replies: 1
    Last Post: 04-12-2014, 04:03 PM
  4. split column string data and add numbers
    By gpatel in forum Excel General
    Replies: 6
    Last Post: 12-25-2011, 10:37 PM
  5. Can excels Split() function split a string up at multiple spots?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2011, 02:36 PM
  6. Split String into Column
    By vinoykjha in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-29-2011, 04:52 AM
  7. Replies: 2
    Last Post: 08-26-2008, 04:03 AM

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