PrevWorkDay is a date. If the date is NOT a Friday, I would like to filter to show all dates besides PrevWorkDay (this works correctly in the Else statement). If PrevWorkDay IS a Friday, I would like to filter to show all dates besides PrevWorkDay, as well as that following Saturday, and that following Sunday. I have a start below, but I'm assuming that my issue lies in me not using vbFriday or the associated AutoFilter correctly.
Thanks for your time!
Thanks for your time!
Code:
If PrevWorkDay = vbFriday Then
With rng
.AutoFilter Field:=1, Criteria1:=Array("<>" & PrevWorkDay, "<>" & PrevWorkDay + 1, "<>" & PrevWorkDay + 2), Operator:=xlAnd
.Offset(1, 0).SpecialCells(xlCellTypeVisible).EntireRow.Delete
End With
Else
With rng
.AutoFilter Field:=1, Criteria1:="<>" & PrevWorkDay
.Offset(1, 0).SpecialCells(xlCellTypeVisible).EntireRow.Delete
End With
End If