Auto filter and then auto update advanced filtering in other sheet having dynamic criteria range

shoun2502

New Member
Joined
Nov 14, 2018
Messages
45
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
1. I have data in Sheet 1 having 2 columns name Description and Range_T and in Range_T "*" is used for advanced filtering for text.


2. In sheet 2 I have Range_T which is having different data and needs to filtered using Range_T as "criteria range" which is dynamic as description data keeps on changing.


3. I need to extract data in sheet 2 under "Range_T" with auto update advanced filter as I filter down values in description and RangeT keeps on changing.




Please help me out with vba code.


Thanks.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Could you upload a file to the cloud with an example of data and an example using an advanced filter with one of the criteria?
 
Upvote 0
LYh58
LYk2C
Untitled 1 - The one where I Need to filter out the result in Sheet 2Untitled 2- - Sheet 1 criteria range which is a dynamic range and keeps on changing depending of description




Result- I need to filter values from Description sheet 1 and subsequently Criteria_T gets filtered and which should be the Criteria range for advanced filter and eventually the values shall get filtered in Sheet 1 Criteria_T


Thanks
 
Last edited:
Upvote 0
Test the following:


Code:
Sub Auto_filter()
'
    Set h1 = Sheets("Sheet1")   'criteria
    Set h2 = Sheets("Sheet2")   'data
    u1 = h1.Range("C" & Rows.Count).End(xlUp).Row
    u2 = h2.Range("B" & Rows.Count).End(xlUp).Row
    h2.Range("B1:C" & u2).AdvancedFilter Action:=xlFilterInPlace, _
        CriteriaRange:=h1.Range("C2:C" & u1), Unique:=False
End Sub
 
Upvote 0
Thanks for the reply.

But the code is not working.

Please share your mail id , I ll share my sheet for better understanding.
 
Last edited:
Upvote 0
By forum rule it is not possible by mail, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,636
Members
452,662
Latest member
Aman1997

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