Automatically re-filter when I change a value in a cell

Porcupine_

New Member
Joined
Jul 26, 2016
Messages
28
Hello,

I have a column starting from cell D22, which is set on a filter to eliminate the value "N" and keep the value "Y". The value ("Y" or "N") is generated by a formula that looks at whether the corresponding value in column A matches a value selected from a dropdown list in cell A6.

The problem is, whenever I change the value in cell A6, the column D does not re-filter to show only "Y" values, and is left with "N" values.

I am looking for a way to re-apply filters on the sheet whenever I change a value in Cell A6.

I have tried using this VBA:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.AutoFilter.ApplyFilter
End Sub

But it isn't working for me - it doesn't come up with an error, but it just doesn't re-filter.

Is anybody able to help with this?

Thank you,

Vicky
 
Re: Automaticlaly re-filter when I change a value in a cell

Yes I have closed and re-opened the file a few times - still not working
It is data validation, yes - and I have tried making the source data (the possible list items) come from a list defined in some other cells, or written manually into that 'source' box in the data validation section
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Re: Automaticlaly re-filter when I change a value in a cell

Check your trust center settings (in options) and make sure that macros are enabled.
 
Upvote 0
Re: Automaticlaly re-filter when I change a value in a cell

Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,206
Members
453,022
Latest member
RobertV1609

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