View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Hide Second Row - Relative (row number changes)

Sub BBB()
Dim i As Long, j As Long
i = 0
j = 1
Do Until i = 2
If Cells(j, 1).EntireRow.Hidden = False Then
If i = 1 Then
Cells(j, 1).EntireRow.Hidden = True
i = i + 1
Exit Do
Else
i = i + 1
End If
End If
j = j + 1
Loop

End Sub

You could also probably use specialcells, but I would need to know more
about what is on your sheet and what you are doing. The above should be
sufficient.

--
Regards,
Tom Ogilvy




"JEFF" wrote in message
...
Hi All,

Should be easy -- I simply want to hide the second row, but that row

number
may be two now, three later, and four after that.... How do I get it to

not
care about the row number, yet hide the second visible row?

Thanks!