Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have created spreadsheets, to list students and their data, that have to be
updated weekly. The lists have to be printed as well. To keep the width within one page, the font has to stay at 8 pts. For ease of reading, each record alternates color from its "neighbors". I have created macros to reshuffle the colors after I resort names when new ones are added in, since the color of the records follows the name to its new row. I have a value of 40 for the height of the rows that is mostly adequate. The problem comes from a wrapping memo field within each record that may increase the height of the row to above 40 pts. When I re-sort the list of names, the macros take care of the colors, but the height of the rows stay put; that means that some records that could use more space in the memo field get cropped off, while some that do not need the space may now be located in a row that is too high. The autofit function works for this problem, except that it "squishes" the data, so that it becomes less easy to read. What I would like to do is to be able to use the autofit function, but also to put a minimum of 40 pts height per row. Is that possible? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() After doing the autofit run this. This will add 40 to each row within the loop. If you only want to extend those over a cerain size put in an "if " to test the row height first. Dim i As Integer Dim rng As Range Set rng = Range("1:1") For i = 1 To 50 rng.Offset(i).RowHeight = rng.Offset(i).RowHeight + 40 Next best wishes Tony -- tony h ------------------------------------------------------------------------ tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074 View this thread: http://www.excelforum.com/showthread...hreadid=515512 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I think that you'll have to loop through the rows and look at the rowheights:
Option Explicit Sub testme() Dim myRow As Range With Worksheets("sheet1") For Each myRow In .Range("a1:A99").EntireRow.Rows myRow.AutoFit If myRow.RowHeight < 40 Then myRow.RowHeight = 40 End If Next myRow End With End Sub NadineWoj wrote: I have created spreadsheets, to list students and their data, that have to be updated weekly. The lists have to be printed as well. To keep the width within one page, the font has to stay at 8 pts. For ease of reading, each record alternates color from its "neighbors". I have created macros to reshuffle the colors after I resort names when new ones are added in, since the color of the records follows the name to its new row. I have a value of 40 for the height of the rows that is mostly adequate. The problem comes from a wrapping memo field within each record that may increase the height of the row to above 40 pts. When I re-sort the list of names, the macros take care of the colors, but the height of the rows stay put; that means that some records that could use more space in the memo field get cropped off, while some that do not need the space may now be located in a row that is too high. The autofit function works for this problem, except that it "squishes" the data, so that it becomes less easy to read. What I would like to do is to be able to use the autofit function, but also to put a minimum of 40 pts height per row. Is that possible? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do i execute a VBA function by clicking on an excel cell? | Excel Discussion (Misc queries) | |||
Can I modify cell attributes (font,color etc.) based on function . | Excel Discussion (Misc queries) | |||
Excel 2003 Slow Function Argument Window | Excel Discussion (Misc queries) | |||
Excel option to store trendline's coefficients in cells for use | Charts and Charting in Excel | |||
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. | Excel Worksheet Functions |