Quantcast
Channel: Divide text in multiple lines in a single Excel cell using VBA - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by Dick Kusleika for Divide text in multiple lines in a single Excel cell using VBA

$
0
0

If it's just for display purposes, then I think there is an easier method. You could set the column width to a width you like and format the cells in that column to Wrap Text.

There are two settings on your Querytable that you need to pay attention to. "Adjust column width" is unchecked by default and you need to check it. If you don't, Excel will make the column bigger and the fact that you have Wrap Text checked won't matter. "Preserve cell formatting" is checked by default and needs to remain checked. That will ensure that Wrap text stays checked for that column.

Setting the column width won't guarantee that you get a specific number of characters unless you use a fixed font. But if you just want to get close, this should work.


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>