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

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
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,223,911
Messages
6,175,331
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