Make dynamic advanced filter trigger on formula value update

szakharov7723

Board Regular
Joined
Jun 22, 2018
Messages
85
Office Version
  1. 2019
Platform
  1. Windows
So currently I have an advanced filter that triggers on value input. However when I try to make criteria cell formula based it ignores changes. unless I click on cell and hit enter
Here is my advanced filter
Code:
Private Sub Worksheet_Change(ByVal Target As Range)    If Not Intersect(Target, Range("A5:S7")) Is Nothing Then
        On Error Resume Next
        ActiveSheet.ShowAllData
        Range("A9").CurrentRegion.AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=Range("A4").CurrentRegion
    End If
End Sub

Is it possible to make triggered on formula value changes ?
 
Thank you a lot. Looks like it is working.
So generally speaking, when I add new range in
Code:
[COLOR=#333333] If Not Intersect[/COLOR]
I can use this range as both value and formula for other ranges in Intersect ?
 
Upvote 0

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
The formula will not trigger the change event, so you have to add the cells that the formula looks at.
So as the formula in E5 is looking at P2, you need to add P2 to the intersect range
 
Upvote 0
Glad we could help & thanks for the feedback
 
Last edited:
Upvote 0
One option is to put in the range the cells that make up the formula, that is, if the cell A5 has the formula =A3 and really the value you are changing is A3, then you should have:
If Not Intersect (Target, Range ("A3"))

That I mentioned from post # 2
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,335
Members
452,636
Latest member
laura12345

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