Solved

Clone AutoFilter object in Excel

Posted on 2012-03-21
2
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

617 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