+ Reply to Thread
Results 1 to 5 of 5

Splitting text into 3 columns

  1. #1
    Registered User
    Join Date
    07-03-2017
    Location
    singapore
    MS-Off Ver
    2013
    Posts
    3

    Smile Splitting text into 3 columns

    Hi all,

    I have 4 columns with names inside. I need to make sure the all the columns has a maximum of 30 characters only. I would need whole names inside. It cant be cut off half way.

    Scenario 1

    If the first column has 20 characters inside, 2nd column has 20 characters and 3rd column has 20 characters. It should remain this way.

    Scenario 2.

    If the first column has 31 characters inside, 2nd column has 15 characters and 3rd column has 15 characters.
    The last word of the first column should shift over to the 2nd column. And continue from there. leaving the 3rd column as it is.

    Scenario 3

    If the first column has 40 characters, 2nd column has 30 characters and 3rd column has 15 characters.
    The first column should be at a max of 30 characters. The remainder will be pushed to the start of the 2nd column combining with the original data from the 2nd column. And the now if the 2nd column has more than 30 characters it will push over to the 3rd column.


    Example,

    A1
    1. John Smith Bohdie Alam Shah mane
    2. Poer Poemn John
    3. Peter Russel

    B2
    2. As owner and changi hosptial champ
    3. Champ

    C3
    2. Jeremieh


    I would need it to look like below.


    A1
    1. John Smith Bohdie Alam Shah
    2. Poer Poemn John
    3. Peter Russel

    B2
    1. Mane
    2. As owner and changi hosptial
    3. Champ

    C3

    2. champ Jeremieh


    The cells are next to each other. Hence A1,B1,C1
    I used the numbering to make it easier to note which row it comes from.


    Thank you!!!! for the help. If u guys could provide formulas or codes i would be so grateful. Using excel 2013.
    Last edited by s.b.e; 07-03-2017 at 02:18 AM. Reason: arranging the cells nicely.

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Splitting text into 3 columns

    Try and let me know

    Please Login or Register  to view this content.

    Kind regards
    Leo

  3. #3
    Registered User
    Join Date
    07-03-2017
    Location
    singapore
    MS-Off Ver
    2013
    Posts
    3

    Re: Splitting text into 3 columns

    Hi Leo,

    Would it be possible for the range to extend till "E" instead of C

  4. #4
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Splitting text into 3 columns

    Sure

    Please Login or Register  to view this content.
    Kind regards
    Leo

  5. #5
    Registered User
    Join Date
    07-03-2017
    Location
    singapore
    MS-Off Ver
    2013
    Posts
    3

    Re: Splitting text into 3 columns

    Hi Leo,

    Thank you so much for the help. The code works perfectly.

    Best Regards,

    S.B.E

+ 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. [SOLVED] Splitting Text String Into Separate Columns
    By robertguy in forum Excel General
    Replies: 2
    Last Post: 02-06-2016, 01:26 PM
  2. [SOLVED] Splitting numbers and text to their respective columns
    By JEAN1972 in forum Excel General
    Replies: 7
    Last Post: 07-31-2014, 06:48 AM
  3. Replies: 4
    Last Post: 07-25-2014, 12:59 AM
  4. splitting text string into different columns
    By lbm1978 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-13-2013, 05:13 PM
  5. [SOLVED] Loop through worksheets when splitting text to columns
    By majaover in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-27-2013, 03:54 AM
  6. Splitting Text Across Columns
    By soma2004 in forum Excel General
    Replies: 1
    Last Post: 07-27-2007, 06:38 PM
  7. [SOLVED] Splitting text to columns
    By nospaminlich in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-06-2006, 05:30 PM

Tags for this Thread

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