Advanced Filter and VBA

martywms

New Member
Joined
Mar 27, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have code for reading and recording existing autofilter parameters on a worksheet, clearing the filter to perform some operation, then re-applying the original autofilter parameters. Now I'm trying to do the same thing with code for advanced filters. I have previously coded setting and clearing advanced filters, but I can't find how to record a previously applied advanced filter where the filter was set by someone else. I need to be able to find and record the criteriarange, but so far I haven't been able to figure out how to do that.

Thanks!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Welcome to the forum.

I am not aware of any way to do that. The filtered range is recorded in a named range, but the criteria range is not always recorded unless it's on the same sheet. If you know it will be on the same sheet then you can look for a range called 'sheet name'!criteria
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,590
Members
449,039
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top