DarkJester89
Board Regular
- Joined
- Nov 5, 2017
- Messages
- 109
- Office Version
- 2016
- Platform
- Windows
Can anybody suggest a way, VBA to apply to a range of cells into one row (B2:CT2) so it's one word per line (in the same cell).
I have a code that extends the column out but it pushes all the text to one line, so it's too long.
Example Cell, what it says: Dog and Cat
Example Cell, what it looks like:
What I'm aiming for:
Any help is much appreciated and thank you in advance.
I have a code that extends the column out but it pushes all the text to one line, so it's too long.
VBA Code:
Sub AutoFitWrappedText()
With Range("B2:CT2").EntireColumn
.ColumnWidth = 255 ' maximum width
.AutoFit
End With
End Sub
Example Cell, what it says: Dog and Cat
Example Cell, what it looks like:
Code:
Do
g
an
cat
What I'm aiming for:
Code:
Dog
and
Cat
Any help is much appreciated and thank you in advance.