+ Reply to Thread
Results 1 to 8 of 8

Formula to Spit up Cells based on words and character length

  1. #1
    Registered User
    Join Date
    05-13-2010
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Formula to Spit up Cells based on words and character length

    I need a function that can split up cells based on a character length but will also look at the words so that it does not split up a word in half due to a character limitation. For example, lets say I split up the sentence below into two cells in a row based on 35 characters.

    I am creating this sentence as a Test String Example for Demonstration purposes.

    What happens is it splits the word Test in half since the 'e' in test is the 35th character. I want to be able to split the sentence at 35 characters, but I want it to recognize test as a word and move the entire word into the 2nd cell. Then cut off the sentence at the last full word which is the letter/word "a" within that 35 character limit.

    I am creating this sentence as a Te st String Example for Demonstration purposes.

    I want to be able to split the sentence at 35 characters, but I want it to recognize test as a word and move the entire word into the 2nd cell. Then cut off the sentence at the last full word which is the letter/word "a" within that 35 character limit.

    I am creating this sentence as a Test String Example for Demonstration purposes.

    Is there a function to do that?
    Last edited by NBVC; 05-14-2010 at 07:38 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula to Spit up Cells based on words and character length

    Have a look at this recent thread... sounds similar:

    http://www.excelforum.com/excel-prog...ole-words.html

    just change the 25's to 35's
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-13-2010
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Formula to Spit up Cells based on words and character length

    Thank you! That is perfect!

  4. #4
    Registered User
    Join Date
    05-13-2010
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Formula to Spit up Cells based on words and character length

    Using my example above and your formula from another post, it now puts the word "Test" in the second cell but with a space in front of the word "Test". Is there a way to remove the space in the same formula?

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula to Spit up Cells based on words and character length

    Enclose the formula within a TRIM() function.

  6. #6
    Registered User
    Join Date
    05-13-2010
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Formula to Spit up Cells based on words and character length

    Thank you for your help

  7. #7
    Registered User
    Join Date
    08-01-2016
    Location
    USA
    MS-Off Ver
    office 2010
    Posts
    4

    Re: Formula to Spit up Cells based on words and character length

    NBVC

    I don't not understand your closing formula ( then =SUBSITUTE(A1,B1"") / The first part worked perfect. Can you write out the formula to retrieve the following text greater than 35 for cell C1?

    Thanks, Ryan

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,918

    Re: Formula to Spit up Cells based on words and character length

    HAYRYA,
    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Ben Van Johnson

+ 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