Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd like to set the height of all my rows to a certain minimum height. At
the moment, the only thing I can make work is to iterate through every row: For iRow = numRow To 2 Step -1 If Rows(iRow).RowHeight < 25.5 Then Rows(iRow).RowHeight = 25.5 End If Next iRow Is there a faster way to do this using a range? Ed |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() this sets all rows in the active worksheet to 25.5 Cells.Select Selection.rowheight = 25. -- crispb ----------------------------------------------------------------------- crispbd's Profile: http://www.excelforum.com/member.php...fo&userid=1088 View this thread: http://www.excelforum.com/showthread.php?threadid=27638 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
Range("A1", Range("A1").Offset(10, 255)).Select Selection.RowHeight = 25.5 in this example i just selected a range 10 rows down from A1 and 255 collumns(all). you will have to find out how to select your range. the above rowheight command is pretty instantanious. regards -----Original Message----- I'd like to set the height of all my rows to a certain minimum height. At the moment, the only thing I can make work is to iterate through every row: For iRow = numRow To 2 Step -1 If Rows(iRow).RowHeight < 25.5 Then Rows(iRow).RowHeight = 25.5 End If Next iRow Is there a faster way to do this using a range? Ed . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ed,
Ed wrote: I'd like to set the height of all my rows to a certain minimum height. At the moment, the only thing I can make work is to iterate through every row: For iRow = numRow To 2 Step -1 If Rows(iRow).RowHeight < 25.5 Then Rows(iRow).RowHeight = 25.5 End If Next iRow Is there a faster way to do this using a range? As others have noted, it will be much faster to set the row height on a range than through iterating over the rows 1 by 1. This command will set the row height to 25.5 for the entire used range of the active Worksheet: ActiveSheet.UsedRange.RowHeight = 35.5 -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the tips. I can do that. But sometimes with Word Wrap on, the
information in the row has already made the row more than 25.5. If I make it "only" 25.5, I will cut off text. Using the iteration, I can check to see if the row is less than that, and enlarge it if it is; it is left alone, though, if it's already tall enough. Ed "Ed" wrote in message ... I'd like to set the height of all my rows to a certain minimum height. At the moment, the only thing I can make work is to iterate through every row: For iRow = numRow To 2 Step -1 If Rows(iRow).RowHeight < 25.5 Then Rows(iRow).RowHeight = 25.5 End If Next iRow Is there a faster way to do this using a range? Ed |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Iteration | Excel Worksheet Functions | |||
iteration | Excel Discussion (Misc queries) | |||
Iteration | Excel Discussion (Misc queries) | |||
Non-Contiguos Range Iteration | Excel Programming | |||
NonContiguous Range Iteration Bug? | Excel Programming |