Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-19-2018, 06:19 AM
p45cal's Avatar
p45cal p45cal is offline Automating Advanced filtering Windows 10 Automating Advanced filtering Office 2016
Expert
 
Join Date: Apr 2014
Posts: 962
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Since you have the criteria range in its own 'white space'', you can use CurrentRegion to determine its extent, so you only need one line (you don't need the Dims because the code is inside the sheet's own code-module so all unqualified ranges refer definitively to that same sheet):
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("B12:C24").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=Range("B3").CurrentRegion, Unique:=False
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automating Updates For Advanced Filtering Into New Sheet indieben Excel 12 07-23-2018 04:08 PM
Automating Advanced filtering Need to put citations in, need help automating if possible AOEUD Word 2 11-06-2015 02:58 PM
Automating Advanced filtering Filtering (advanced?) in Pivot Table canajun Excel 6 01-17-2015 05:01 AM
Automating Advanced filtering automating powerpoint trstbmbk PowerPoint 1 11-12-2013 02:09 AM
Automating Advanced filtering Automating dates OCM Outlook 4 04-03-2013 08:29 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft