Create Range of Visible Rows only
Assume the range is A1:C25
Sub testVis()
Dim rng As Range, c As Range
Set rng = ActiveSheet.Range("A1:C25")
For Each c In rng.SpecialCells(xlCellTypeVisible)
If c.Row.Hidden = True Then
MsgBox "Not Working"
Else
MsgBox "Working"
End If
Next
End Sub
You should get Working only when the macro runs.
"Humphrey" wrote in message
...
I would like to create a range containing only the visible rows in columns
A:N. I can filter the list and then create a range but it selects all the
hidden rows as well. Is there a way to restrict the range to just the
visible rows?
H
|