View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jan Karel Pieterse Jan Karel Pieterse is offline
external usenet poster
 
Posts: 535
Default moving rows based on criteria

Hi Phillips,

In the past, when I used auto filter and cut and paste, it moved all rows in
between (even hidden) and I don't want this to happen! I would prefer, not
to mess with filters, as sometimes, I do have some funky and complicated
filters inpalce. But. I can live with that, if I can figure out how to
prevent the hidden rows from being moved.


Use something like this:

Dim oRange As Range
Set oRange = ActiveSheet.Range("A1:F2000") 'or whatever your filtered range is
oRange.Cells.SpecialCells(xlCellTypeVisible).Copy
'now paste somewhere


Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com