Advanced Filter

Davidns

Board Regular
Joined
May 20, 2011
Messages
159
Office Version
  1. 365
Platform
  1. MacOS
I am starting to use Advance Filtering, and notice that when I try to clear the filter, the table formatting is cleared as well. How can I just remove the Advance Filter settings without disturbing anything else on the table?
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I am unable to recreate your problem - possibly because I am doing something different


1 Which version of Excel are you using?

2 Are you applying advanced filter against a standard range or a structured table ?

3 Is the data being "filtered in place" or copied to another sheet ?

4 How are you clearing the filter ?

5 Which type of formatting is being cleared ?
- all formatting
- conditional formatting ?
- formatting in specific columns ?
 
Upvote 0
Hi, thanks for your response:

1) Office 365
2) Structured Table
3) Filtered in place
4) by pressing the "clear" choice above the advanced filter menu item
5) Seems to be just the formatting (alternating colors). However, now I see that if I make a change in the table, the colors reappear. Quite odd.

Perhaps there is a better way to clear the advanced filter items? Seems strange that the menu for those choices doesn't include cancelling out the filter.
 
Upvote 0
5) Seems to be just the formatting (alternating colors). However, now I see that if I make a change in the table, the colors reappear. Quite odd.
I found the same thing. Note though that the AutoFilter arrows & capability that normally comes with the structured table do not reappear - at least they didn't for me.


Perhaps there is a better way to clear the advanced filter items?
Not that I am aware of.


Seems strange that the menu for those choices doesn't include cancelling out the filter.
Not sure what you mean here as that is exactly what the 'Clear' is isn't it?
 
Upvote 0
What I mean is that apparently Clear does more than just cancel out the Advanced Filter, given the other things it tends to clear, as we both experienced. So, it seems to me the Advance Filter should be able to be cleared directly, without affecting anything else.
 
Upvote 0
So, it seems to me the Advance Filter should be able to be cleared directly, without affecting anything else.
In relation to the formatting I definitely agree.

In relation to the loss of AutoFilter, note that it is the application of Advanced filter that removes the AutoFilter, not the clearing of Adv Fltr.
I think the logic is that if you had both types of filter going there could be awful confusion about what to show and what to hide if the two types of filters were trying to show different data. :eek:

Note also that it is not only Adv Fltr that has this sort of effect, it also works the other way around. If you have Adv Fltr going on a structured table and you manually re-apply the AutoFilter, that immediately removes the Adv Fltr.
 
Upvote 0
Here is a simple VBA workaround to refresh the table style when clear button is pressed

Unfortunately filtering does not trigger an event
- but we can create one by placing SUBTOTAL formula in a cell
- a recalculation of SUBTOTAL formula triggers event Worksheet_Calculate


Place code in sheet module (will not work anywhere else)
Code:
Private Sub Worksheet_Calculate()
    With Me.ListObjects(1)
        If .Range.SpecialCells(xlCellTypeVisible).CountLarge = .Range.CountLarge Then
            .TableStyle = .TableStyle
        End If
    End With
End Sub

Below is a simple example which works for me - adapt to match your needs
- Table with 2 columns in A5:B10
- Criteria Range is A1:B2
- formula in to trigger an event is in D1
=SUBTOTAL(3,Table1[Player Names])

Excel 2016 (Windows) 32 bit
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]
A
[/th][th]
B
[/th][th]
C
[/th][th]
D
[/th][th]
E
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
1
[/td][td]Player Names[/td][td]Goals[/td][td][/td][td=bgcolor:#FFFF00]
5​
[/td][td] =SUBTOTAL(3,Table1[Player Names])[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
2
[/td][td][/td][td]
15​
[/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
3
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
4
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
5
[/td][td=bgcolor:#4472C4]Player Names[/td][td=bgcolor:#4472C4]Goals[/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
6
[/td][td=bgcolor:#D9E1F2]Name01[/td][td=bgcolor:#D9E1F2]
10​
[/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
7
[/td][td]Name02[/td][td]
15​
[/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
8
[/td][td=bgcolor:#D9E1F2]Name03[/td][td=bgcolor:#D9E1F2]
10​
[/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
9
[/td][td]Name04[/td][td]
15​
[/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
10
[/td][td=bgcolor:#D9E1F2]name05[/td][td=bgcolor:#D9E1F2]
2​
[/td][td][/td][td][/td][td][/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: Sheet1[/td][/tr][/table]
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,144
Members
453,021
Latest member
Justyna P

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