filters

jaybee7171

New Member
Joined
Nov 18, 2005
Messages
2
is there a way to set up a filter, so that it automatically "refreshes" itself, when the members of the list that the filter is on, changes. for example, I am looking up data from a source, then filtering it on the destination sheet. when the source changes, the filter doesn't not adapt. Any help?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
jaybee7171 said:
is there a way to set up a filter, so that it automatically "refreshes" itself, when the members of the list that the filter is on, changes. for example, I am looking up data from a source, then filtering it on the destination sheet. when the source changes, the filter doesn't not adapt. Any help?
Hi jaybee:

Welcome to MrExcel Board!

I have used the following code ...
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    If [E3] = 0 Then GoTo finish
    With Range("A5:a19")
    .AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
        "e1:e2"), CopyToRange:=Range("E5"), Unique:=False
    End With
    Range("a6:a65536").Copy Range("c6")
finish:
End Sub
with a simple dataSet as in the following illustration ...
y051118h2.xls
ABCDEF
1dataSetNew
2criteriona_1
3copy_to0
4DataSetextracted
5NewOldNew
6a_1a_1a_1
7a_2a_2a_16
8a_3a_3a_17
9a_4a_4a_10
10a_5a_5a_11
11a_16a_16a_12
12a_17a_17a_13
13a_8a_8a_14
14a_9a_9
15a_10a_10
16a_11a_11
17a_12a_12
18a_13a_13
19a_14a_14
20
Sheet1


Is this something like what you are looking for?
 
Upvote 0

Forum statistics

Threads
1,216,380
Messages
6,130,291
Members
449,570
Latest member
TomMacca52

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