Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Row Height 1

Status
Not open for further replies.

deborahb

Programmer
Oct 2, 2000
31
US
I have text that I need to format on my spreadsheet. It needs to span multiple columns (merge) and then wrap. I don't know how many lines it will wrap to in advance. Is there a way to calculate what I should programatically set the row height to since "Wrap" doesn't change the row height for merged cells?

Thanks,

Deborah
 
What you want to do isn't very clear, but this is how you merge and set all the cells in the merge to wrap text.

RangeString = "C27:E34" ' you can construct this string any way you want to.


Range(RangeString).Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = True
End With


gl!
-cLocKwOrk
 
I'm not sure if this will do the trick but I will check it out. Thanks. DB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top