Advanced Filter Vs Autofilter

ajm

Well-known Member
Joined
Feb 5, 2003
Messages
2,005
Office Version
  1. 365
Platform
  1. Windows
Hi all. have a need for 4 criteria with my autofilter so have set up an Advanced filter. trouble is, it removes my existing autofilter on surrounding columns. How do I get around this? I have been trying with little success to use a toggle button on my active sheet to apply the advanced filter and then on the second press, return the sheet to "normal" (Normal has the autofilters on C7:i7).

The Toggle Button runs the following code:

Code:
Sub CurrentView()
With ActiveSheet
    If AutoFilterMode Then
    Range("Current_Milestone_Code").AdvancedFilter _
            Action:=xlFilterInPlace, _
            CriteriaRange:=Range("CurrentStatus")
Else
Range("C7:I7").AutoFilter
    End If
    End With
    ActiveSheet.Calculate
 
End Sub

i want to toggle between the advanced criteria (with enabled filter drop downs in C7:i7) and my "normal" view.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,214,913
Messages
6,122,207
Members
449,074
Latest member
cancansova

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