Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel : Selecting Only Rows that are filtered 1

Status
Not open for further replies.

OzzieOwl

Technical User
Dec 13, 2001
45
GB
I am working in VBA for Excel
I need to copy some from one sheet to another, but only on data that has been selected by an AutoFilter, does anyone know how to select only the rows that have been selected by the filters.

Cheers

Martin

 
Hi Martin,

This is the equivalent of Edit >> GoTo >> Special >> Visible Cells Only

To do this in VBA, select the range that contains the list (or replace the word "Selection" with a reference to the range), then use the following statement to copy only the visible (filtered) cells:
[tt]
Selection.SpecialCells(xlCellTypeVisible).Select
[tt]
Good luck, SteveB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top