Row Height
This macro will scan down column C and if the cell is totally empty it will
adjust the height to the default height 12.75, else row height will be 15.
Sub RowSizer()
Dim lngLastRow As Long
Dim rng As Range
lngLastRow = Cells(Rows.Count, "C").End(xlUp).Row
For Each rng In Range("C1:C" & lngLastRow)
If IsEmpty(rng) Then
rng.RowHeight = 12.75
Else
rng.RowHeight = 15
End If
Next rng
End Sub
Hope this helps! If so, let me know, click "YES" below.
--
Cheers,
Ryan
"JohnUK" wrote:
Hi All,
Can anyone help with this.
Is there a piece of code that will change the height of the Row/Rows if
there is data in columns.
For example:
If I had data from cells C6 through to C100, only those rows would be 15
instead of the default of 12.75. Because the data is forever changing, I
would want the rows to change with it.
Sounds rather pointless I know, but can it be done
Many thanks in advance
Regards
John
|