I've got a sub routine that works to apply a filter to conditions in column I. I need to add another condition that would only apply to the list set if a date condition is met. Need the date checked for today in Column L before applying .
Sub AF()
Dim RX As Object, d As Object
Dim a As Variant
Dim i As Long
Const myList As String = "Z0|Z10|Z11|Z12|ZA|ZB1|ZB2|ZB3|ZB4|ZB5|AMD|ZP1|AMD" '<- Add more here if required
Set d = CreateObject("Scripting.Dictionary")
d.Comparemode = 1
Set RX = CreateObject("VBScript.RegExp")
RX.IgnoreCase = True
RX.Pattern = myList
a = Range("I2", Range("I" & Rows.Count).End(xlUp)).Value2
For i = 1 To UBound(a)
If RX.Test(a(i, 1)) Then d(a(i, 1)) = 1
Next i
Range("$A$1:$R$1").Resize(UBound(a)).AutoFilter Field:=9, Criteria1:=d.Keys, Operator:=xlFilterValues
End Sub
Sub AF()
Dim RX As Object, d As Object
Dim a As Variant
Dim i As Long
Const myList As String = "Z0|Z10|Z11|Z12|ZA|ZB1|ZB2|ZB3|ZB4|ZB5|AMD|ZP1|AMD" '<- Add more here if required
Set d = CreateObject("Scripting.Dictionary")
d.Comparemode = 1
Set RX = CreateObject("VBScript.RegExp")
RX.IgnoreCase = True
RX.Pattern = myList
a = Range("I2", Range("I" & Rows.Count).End(xlUp)).Value2
For i = 1 To UBound(a)
If RX.Test(a(i, 1)) Then d(a(i, 1)) = 1
Next i
Range("$A$1:$R$1").Resize(UBound(a)).AutoFilter Field:=9, Criteria1:=d.Keys, Operator:=xlFilterValues
End Sub