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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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