View Single Post
 
Old 06-22-2011, 08:40 AM
Catalin.B Catalin.B is offline Windows Vista Office 2007
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

Let there be problems, so we can find solutions...
in column B , i entered this formula: =LEN('C:\Users\Catalin\Desktop\Iordachi Gh. Gheorghe\[text plan afaceri 141 -Iordachi Gh. Gheorghe .xls]text plan'!$A7). The result is a number which i can use to set the row for 130 characters in a row, with a formula , in column C: =CEILING(15*D5/130;15) The result is a multiple of 15, 30, 45, 60, depending on text length.
And finally, the macro works great...

Sub Height()
Application.ScreenUpdating = False
Rows("565:565").RowHeight = Sheets("Rand").Range("C22")
Rows("566:566").RowHeight = Sheets("Rand").Range("C23")
Rows("595:595").RowHeight = Sheets("Rand").Range("C25")
Rows("597:597").RowHeight = Sheets("Rand").Range("C26")
Rows("599:599").RowHeight = Sheets("Rand").Range("C27")
Rows("600:600").RowHeight = Sheets("Rand").Range("C28")
Rows("4:4").RowHeight = Sheets("Rand").Range("H5")
Rows("65:65").RowHeight = Sheets("Rand").Range("H6")
Rows("214:214").RowHeight = Sheets("Rand").Range("H7")
Rows("215:215").RowHeight = Sheets("Rand").Range("H8")

Application.ScreenUpdating = True
End Sub
Many thanks to gjcase and Tony, for guidance through this process, you're great guys!
Reply With Quote