+ Reply to Thread
Results 1 to 14 of 14

Split a line of words, each word in a separate cell

  1. #1
    Forum Contributor
    Join Date
    03-16-2007
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2007
    Posts
    202

    Split a line of words, each word in a separate cell

    This must be easy but I'm fighting with it for hours. Please help

    I have lists of words like this one:
    !BERLIN, !LONDON, !MADRID, !PARIS, !ROME, !ATHENS

    I need a formula which will split these lines, each word in a separate cell, without the comas.
    In the example attached, I need formulas in columns B-K, which will do this for up to 10 words for each row.

    Thanks in advance!!
    Attached Files Attached Files
    Last edited by Hitch75; 08-03-2012 at 01:03 PM.

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Split a line of words, each word in a separate cell

    Have you tried Text to Columns function under the Data tab
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Contributor
    Join Date
    03-16-2007
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2007
    Posts
    202

    Re: Split a line of words, each word in a separate cell

    I need it to be automatic, with formulas...

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Split a line of words, each word in a separate cell

    Formulas get longer and longer...

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


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


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


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


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

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Split a line of words, each word in a separate cell

    Hitch75,

    Attached is a modified version of your example file. In cell B2 and copied over and down to cell K4 is this formula:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Split a line of words, each word in a separate cell

    Here's a solution with just two formulas.
    In B2 dragged down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    same as Abousetta's

    In C2 dragged across and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    See attached. Does that work for you?
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Split a line of words, each word in a separate cell

    Personally, I would use vba to split the cell into an array and print back to the sheet... but that's just me

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Split a line of words, each word in a separate cell

    Nice one Tiger.

  9. #9
    Forum Contributor
    Join Date
    03-16-2007
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2007
    Posts
    202

    Re: Split a line of words, each word in a separate cell

    abousetta, I took your formulas which get longer and longer
    it works fine.

    thanks!!

  10. #10
    Registered User
    Join Date
    10-09-2003
    Posts
    25

    Re: Split a line of words, each word in a separate cell

    All, I am borrowing this thread as it very similar to what I am looking for except that I am looking to code a user defined function, "Split" with 1 argument. My text are delimited by | but with various parts and sometime empty part. Please help. Thanks.

    Please Login or Register  to view this content.

  11. #11
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Split a line of words, each word in a separate cell

    @ slc

    Unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

  12. #12
    Registered User
    Join Date
    10-09-2003
    Posts
    25

    Re: Split a line of words, each word in a separate cell

    no worry. I will create a new thread.

  13. #13
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Split a line of words, each word in a separate cell

    thought i should share this variation, entered in B2:

    Please Login or Register  to view this content.
    and drag-filled right...
    Last edited by icestationzbra; 08-08-2012 at 11:17 PM. Reason: absoref
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  14. #14
    Registered User
    Join Date
    10-09-2003
    Posts
    25

    Re: Split a line of words, each word in a separate cell

    Also to share with others on how to do similar text split using a user defined function. Refer to the URL below:
    http://www.excelforum.com/excel-form...-function.html

+ 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