Text in cells - how to break it up into X # of characters

mpajares

New Member
Joined
Apr 25, 2011
Messages
2
Good morning,

I am currently workin with Excel 07 on windows XP Professional and i ran into an issue a couple of days back on a spreadsheet that contains mainly text responses inside of the cells.

I am trying to create a subroutine that recognizes the cells that exceed an X number of characters ( which I understand that the character length varies depending on the cell pixel size – we are using a standard of 546 pixels height by 442 pixels width = about 2170 characters) and takes the overflow of such cell, adds a new row under the cell and pastes that overflow into it (of course, the formatting of this new cell still fits 2170 characters in a 546x442 pixels). This process is done iteratively throughout the entire sheet. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
<o:p>So for example, the text in A5 contains 8000 characters. It will take the first 2170 characters, leave them in A5, insert a row right underneath if the space is not used (otherwise use A6) and paste such overflow. Then take the next 2170 characters,, leave them in A6 and paste the overflow in A7 (again, if A7 is empty, paste directly there, otherwise create a row and paste on the new A7), etc etc etc.</o:p>
<o:p></o:p>
<o:p></o:p>
Thank you in advance
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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