View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
MikeG22 MikeG22 is offline
external usenet poster
 
Posts: 3
Default Autofilter question

I'm sorry, that does work. Thanks!

"Boo" wrote:

Mike,

Try this:

For a = 20 To 1 Step -1
If Rows(a).Hidden = True Then
Rows(a).EntireRow.Delete
End If
Next a

Obviosuly it's a small example of the syntax - change the way you scroll
through the rows as you see fit.

"MikeG22" wrote:

I am trying to programatically delete all rows that have been filtered out
with an autofilter in an excel spreadsheet. I can find a lot of examples of
how to delete rows that have not been filtered out, but I want all "hidden"
rows deleted.

Any ideas?