Solved

Clone AutoFilter object in Excel

Posted on 2012-03-21
2
255 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

743 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

15 Experts available now in Live!

Get 1:1 Help Now