I have the following code that I can't seem to get to work properly.
If i remove the lastquoterow
and change it to be A13:A250
then it works, but it slows the code way down as it has to go through that entire range and check and see if it needs resized (which since no data exist further down yet, means the entire range will be resized). This also causes some optic issues as it causes rows that are inserted later in subsequent code to have wider spacing than is needed.
I also can't have it resize A1-A12, as this my header range that must remain static.I am trying to tell it to start at A13
where my range begins, go to the last used row, if the row size is < 21
, set height to 21. Then my next stage of code begins and inserts more data that deals with merging cells and such, which has its own code for setting its row height and can't be messed with.
What am I messing up with this one?
Dim lastquoterow
lastquoterow = quote1.Columns("A").Cells.Find("*", SearchOrder:=xlByRows, LookIn:=xlValues, SearchDirection:=xlPrevious).Row
For Each c In Range("A13" & lastquoterow)
If c.RowHeight < 21 Then
c.RowHeight = 21
End If
Next