Hi all,
I have a Sub that currently works to automatically filter 3 different words in two columns in my workbook. What I am after is for an change up of this macro: so that it will filter when column 1 = "SentProgress" does not match column 2 = "ReceivedProgress". An example of this would when a specific row in column 1 has a "Yes" and the same matching row in column 2 has a "No" etc.
Does anyone have some good ideas on how I would alter my code for this? This is what my current code looks like:
Any help on this would be appreciated!
Thanks,
Milos
I have a Sub that currently works to automatically filter 3 different words in two columns in my workbook. What I am after is for an change up of this macro: so that it will filter when column 1 = "SentProgress" does not match column 2 = "ReceivedProgress". An example of this would when a specific row in column 1 has a "Yes" and the same matching row in column 2 has a "No" etc.
Does anyone have some good ideas on how I would alter my code for this? This is what my current code looks like:
Code:
Sub Filter_Dates_Matching()
Dim sent As Range
Dim received As Range
Set sent = Range("2:2").Find("SentProgress", , , xlWhole, , , False, , False)
Set received = Range("2:2").Find("ReceivedProgress", , , xlWhole, , , False, , False)
If Not sent Is Nothing Then
ActiveSheet.Rows(2).AutoFilter
ActiveSheet.Rows(2).AutoFilter Field:=sent.Column, Criteria1:=Array("Yes", "No", "NA"), Operator:=xlFilterValues
ActiveSheet.Rows(2).AutoFilter Field:=received.Column, Criteria1:=Array("Yes", "No", "NA"), Operator:=xlFilterValues
End If
End Sub
Any help on this would be appreciated!
Thanks,
Milos