How can I change the row height of specified rows?

R

ryguy7272

Ok, try this:
Sub demo()
Dim i As Integer
With Range("a1")

For i = 1 To 200

..Offset(i * 4, 0).Select
Selection.RowHeight = 25

Next i
End With

End Sub
 
G

Gord Dibben

Manually

Enter numbers 1 to 4 in an unused column.

Select those 4 cells and right-click drag down as far as you wish.

Release and "copy cells"

Autofilter for number 4

Then F5>Special>Visible Cell Only>OK

Format>Row>Height........set a height.

Get rid of Autofilter. Delete unused column.

Or run a macro.

Sub rowht()
For i = 4 To Cells(Rows.Count, "a").End(xlUp).Row Step 4
Rows(i).RowHeight = 24
Next i
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top