Add a delimiter in a string only at blank position and at certain number of chars

james_255

New Member
Joined
Feb 7, 2022
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hello All,

have found many helpful solutions in this forum and now its time for me to also post a question!
I have an excel with many columns and many rows. In each row columns can have a variable text length.
When the length is more that 800 I need to add delimiter(s) and basically split it in chunks of 800 chars or slightly less. I am not allowed to cut any words so the delimiter has to be added where a there is a space. I have tried a few ways to solve this but cannot code the part where when the 800 position is within a word to go back and select the space prior to ensure the delimiter is entered at max pos 800 or slightly earlier in case there is word at that position.
Any help will be greatly appreciated! Thanks in advance!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi james
This has already been done. May just need to change the number of char
 
Upvote 0

Forum statistics

Threads
1,215,006
Messages
6,122,666
Members
449,091
Latest member
peppernaut

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