Archive of Mr Excel Message Board

Back to Data in Excel archive index
Back to archive home

Copy All Filtered Rows after Header
Posted by Marcie on February 20, 2001 2:07 PM
I am trying to write VBA code to select the range of all filtered rows that are produced as a result of an autofilter statement. I do not want to include the header row in the selection. How do I programatically code this? I cannot seem to get it to work.

Re: Copy All Filtered Rows after Header
Posted by David Hawley on February 21, 2001 12:34 AM
Hi Marcie
Try this
ActiveSheet.UsedRange.Offset(1, 0).SpecialCells _
(xlCellTypeVisible).Copy
DaveOzGrid Business Applications

Re: Copy All Filtered Rows after Header
Posted by Marcie on February 21, 2001 7:43 AM
Thank you David! This works great!
Marcie

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.