View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Richard R[_2_] Richard R[_2_] is offline
external usenet poster
 
Posts: 5
Default Unable to delete rows for only filtered results

The extract below is unable to run when the criteria for the
Autofilter results in the number of rows being in excess of around
15800.


Selection.AutoFilter Field:=6, Criteria1:="="
Range("A2").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.EntireRow.Delete

Even when attempted manually, the "delete rows" function will not work
on a filter and deletes ALL data (both hidden and otherwise). Hence my
subject, the macro won't delete only rows for filtered results where
the filter produces too many rows.

I hope I've made myself understood.
Is there a workaround? Cheers