Solved

Clone AutoFilter object in Excel

Posted on 2012-03-21
2
256 Views
Last Modified: 2012-08-13
May I know if it is possible to clone an AutoFilter object in Excel 2010?

My purpose is this:

I have got a number of source data tables in 1 sheet.  I'd like to manipulate the data filtering in the source tables in code, copying the filtered results to other sheets.

At the end, I'd like to restore the AutoFilters originally set in the source tables.

Thanks,
Janice
0
Comment
Question by:janicep
2 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 37747248
I can only think of two real options (there is no simple cloning facility, sadly):
1. Copy the sheet and manipulate the copy of it.
2. You would have to loop through all the tables, loop through each filter in the table, check if it's on and if so, store the operator and both criteria values. Then after your manipulation is done, you would need to reverse this process.

option 1 is obviously simpler, if a bit clunky. Would it work for you?
0
 

Author Closing Comment

by:janicep
ID: 37751899
I guess I will need 2.  At least I know I am not going to do something easy in an overly complex way.  Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now