Archive of Mr Excel Message Board


Back to Data in Excel archive index
Back to archive home

Auto Filtered lists

Posted by DG on May 02, 2000 1:15 PM
Can anyone tell me how, using VBA, to return only those
values meeting the criteria of a filtered list? Example:
If rows 1506,1508 & 1513 are visible under the autofilter,
how can I evaluate only those values for the information
needed in another worksheet without having to loop through
all of the hidden rows which contain unneeded data?

Re: Auto Filtered lists

Posted by Celia on May 03, 2000 2:40 AM

DG
The macro recorder can be used to find out the code to select the visible cells only (i.e. by recording Edit>GoTo>Special>VisibleCellsOnly).

It should produce the code :-
Selection.SpecialCells(xlCellTypeVisible).Select

Celia


Re: Auto Filtered lists

Posted by DG on May 10, 2000 7:56 AM

Thanks Celia,

You saved me hours of work.
DG


Re: Auto Filtered lists

Posted by DG on May 10, 2000 7:58 AM

Thanks, Celia

You saved me hours of work.


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.