Excel Utility - Strings - Break Text

DescriptionThis is how to break a string if its length exceeds the cell's width.

The string can break where any of an array of characters is met, but it must also be the character closest to the limit. If a sentence starts with some spaces, they will be repeated after the break so that the sentence parts will have the same indentation.

In the code it is possible to edit the character limits, the array of characters which can break a sentence and also the break link (which is by default the VBA line continuation "_").

Note that this code breaks the sentence in parts in cells in a column, so it has to be adapted if one wants to use a linebreak in the same cell.
AuthorAnastasiou Alex
Added on2/8/2021
Edited on3/22/2021
Previewstrings break text excel vba