belea
Aerospace
- Nov 26, 2002
- 4
Hi,
I'm not very technical (financial analyst), so can anyone help me write a loop for the procedure below?
The procedure below will hide certain rows.
My excel sheet's structure is follow: one division info, 100 rows down is dollar info for that division.
400 rows down, another division, and 100 rows down, dollar info...
So, in a way, the loop should jump down to 100 (hide) and then 400 (hide) and then 100 (hide) and then 400...
Sub nexthide()
Dim c As Long
finalrow = Range("a65536" 'last rows of the sheet
c = 17 ' rows to hide
Range("a1".Select 'beginning of the sheet
'Somewhere here is the loop
'Do until finalrow
ActiveCell.Offset(19, 0).EntireRow.Resize(rowsize:= c ).Hidden = True
'keep the counter somehow???
loop
End Sub
I tried the loop for awhile, but not very successful, so if anyone could help. Thanks a bunch.
I'm not very technical (financial analyst), so can anyone help me write a loop for the procedure below?
The procedure below will hide certain rows.
My excel sheet's structure is follow: one division info, 100 rows down is dollar info for that division.
400 rows down, another division, and 100 rows down, dollar info...
So, in a way, the loop should jump down to 100 (hide) and then 400 (hide) and then 100 (hide) and then 400...
Sub nexthide()
Dim c As Long
finalrow = Range("a65536" 'last rows of the sheet
c = 17 ' rows to hide
Range("a1".Select 'beginning of the sheet
'Somewhere here is the loop
'Do until finalrow
ActiveCell.Offset(19, 0).EntireRow.Resize(rowsize:= c ).Hidden = True
'keep the counter somehow???
loop
End Sub
I tried the loop for awhile, but not very successful, so if anyone could help. Thanks a bunch.