View Single Post
 
Old 02-11-2018, 07:19 AM
LearnerExcel LearnerExcel is offline Windows 7 32bit Office 2003
Advanced Beginner
 
Join Date: Nov 2016
Posts: 82
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default How to modify code for Auto filter based on two criteria ...

How to modify the following code for Auto filter to search based on two criteria ...
Like : CriteriaRange:=Range("E1:E2") & CriteriaRange:=Range("F1:F2")
Code:
 
PrivateSubWorksheet_Change(ByValTarget AsRange)
'Updateby Extendoffice 20160606
   IfTarget.Address = Range("E2").Address Then
       Range("A1:C20").CurrentRegion.AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=Range("E1:E2")
   EndIf
EndSub
Source: https://www.extendoffice.com/documen...ell-value.html
Reply With Quote