Split a Column into 2, use a character limit that does not cut words in half.

vishesh10667

New Member
Joined
Nov 26, 2019
Messages
18
Office Version
  1. 2007
Platform
  1. Windows
Title says it all.

I have huge columns of data that can only be 30 characters long. I want to use a formula to split the column into two. The original column will have a character limit of 30, and should not cut words in half. If the Length will be more than 30 while including the entire last word of the cell, that word should be the first displayed in adjacent cell in the 2nd column.

The 2nd column should also be 30 characters long. And rest in 3 column


I usually use a Text to Columns method, but dont know how to make it not cut off the words. Any ideas?

Thanks in advance
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Thanks for the coding but it picks up only 30 rows in a sheet
The code should work on every cell in column A, starting at A2 and ending at the last row with data in column A.
Note though that the code was copied from an old post of mine and may not do exactly what you want. It will break the text into the block size given but if the text is long enough it could split it into more than 3 columns. Post back if that is a problem and you want to use a vba method.
 
Upvote 0
this formula is not working on my excel. It just got paste as it is. It doesn't picking the value
That sounds like the cell that you put it into is formatted as Text. If that is so then format the cell as General and the re-confirm the formula by selecting that cell, pressing F2 and then Enter
 
Upvote 0
That sounds like the cell that you put it into is formatted as Text. If that is so then format the cell as General and the re-confirm the formula by selecting that cell, pressing F2 and then Enter

Yes i have tried it but it is highlighting the Len formula given at the last
 
Upvote 0
Perhaps you didn't adjust my formula correctly? Try a blank worksheet and use this icon
1574771465890.png
to copy my data and formulas to A1 in that blank sheet
 
Upvote 0
The code should work on every cell in column A, starting at A2 and ending at the last row with data in column A.
Note though that the code was copied from an old post of mine and may not do exactly what you want. It will break the text into the block size given but if the text is long enough it could split it into more than 3 columns. Post back if that is a problem and you want to use a vba method.

While running the macros it showing a runtime error. which is attached herewith
 

Attachments

  • Capture.JPG
    Capture.JPG
    47.5 KB · Views: 22
Upvote 0
While running the macros it showing a runtime error. which is attached herewith
Hard to read much in that image but it looks like the code has processed some of the rows. Can you post the text of what is in the next row in column A (looks like that might be row 9?) as I assume there must be something different/unusual about what is in that cell.
 
Upvote 0

Forum statistics

Threads
1,216,069
Messages
6,128,602
Members
449,460
Latest member
jgharbawi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top