VBA- Is the cell hidden?
Hello Again,
That's the right approach, however it uses all of the visible cells in column A.
You need to find just the visible cells within the subtotaled area...
'-----------------------------
Sub TestNewsPost()
Dim rngCell As Excel.Range
Dim rngVisible As Excel.Range
Set rngVisible = Range(Cells(1, 1), Cells(Rows.Count, 1).End(xlUp))
Set rngVisible = rngVisible.SpecialCells(xlCellTypeVisible)
For Each rngCell In rngVisible
'Do something
Next 'rngCell
Set rngCell = Nothing
Set rngVisible = Nothing
End Sub
'-----------------------------
Jim Cone
San Francisco, USA
"Thief_" wrote in message
...
I've Subtotalled a worksheet which resulted in rows being hidden. I now want
to loop thru column A of the worksheet and "massage" the data in only the
visible rows. How can I do this?
The only way I could think of was:
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeVisible).Select
And then cycle the selection....
--
|
+-- Thief_
|
|