On Error Resume Next
myRange.AutoFilter Field:=23, Criteria1:="="
myRange.AutoFilter Field:=21, Criteria1:="<>"
If myRange.SpecialCells(xlCellTypeVisible).Count > 0 Then
Range("$U1:$U" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
myRange.SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Else: ActiveSheet.ShowAllData
End If
'
ActiveSheet.ShowAllData
On Error Resume Next
myRange.AutoFilter Field:=23, Criteria1:="="
myRange.AutoFilter Field:=21, Criteria1:="<>"
myRange.AutoFilter Field:=19, Criteria1:="<>"
If myRange.SpecialCells(xlCellTypeVisible).Count > 0 Then
myRange("S1:S").SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
myRange.SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Else: ActiveSheet.ShowAllData
End If
'
ActiveSheet.ShowAllData
On Error Resume Next
myRange.AutoFilter Field:=23, Criteria1:="="
myRange.AutoFilter Field:=21, Criteria1:="<>"
myRange.AutoFilter Field:=19, Criteria1:="<>"
myRange.AutoFilter Field:=18, Criteria1:="<>"
If myRange.SpecialCells(xlCellTypeVisible).Count > 0 Then
myRange("$R1:$R" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
myRange("$A1:$A" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Else: ActiveSheet.ShowAllData
End If
'
ActiveSheet.ShowAllData
On Error Resume Next
myRange.AutoFilter Field:=23, Criteria1:="="
myRange.AutoFilter Field:=21, Criteria1:="<>"
myRange.AutoFilter Field:=19, Criteria1:="<>"
myRange.AutoFilter Field:=18, Criteria1:="<>"
myRange.AutoFilter Field:=12, Criteria1:="<>"
If myRange.SpecialCells(xlCellTypeVisible).Count > 0 Then
myRange("$L1:$L" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
myRange("$A1:$A" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Else: ActiveSheet.ShowAllData
End If
'
ActiveSheet.ShowAllData
On Error Resume Next
myRange.AutoFilter Field:=21, Criteria1:="="
myRange.AutoFilter Field:=19, Criteria1:="<>"
If myRange.SpecialCells(xlCellTypeVisible).Count > 0 Then
myRange("$S1:$S" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
myRange("$A1:$A" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Else: ActiveSheet.ShowAllData
End If
'
ActiveSheet.ShowAllData
On Error Resume Next
myRange.AutoFilter Field:=21, Criteria1:="="
myRange.AutoFilter Field:=19, Criteria1:="<>"
myRange.AutoFilter Field:=18, Criteria1:="<>"
If myRange.SpecialCells(xlCellTypeVisible).Count > 0 Then
myRange("$R1:$R" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("$A1:$A" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Else: ActiveSheet.ShowAllData
End If
'
ActiveSheet.ShowAllData
On Error Resume Next
myRange.AutoFilter Field:=21, Criteria1:="="
myRange.AutoFilter Field:=19, Criteria1:="<>"
myRange.AutoFilter Field:=18, Criteria1:="<>"
myRange.AutoFilter Field:=12, Criteria1:="<>"
If myRange.SpecialCells(xlCellTypeVisible).Count > 0 Then
myRange("$L1:$L" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
myRange("$A1:$A" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Else: ActiveSheet.ShowAllData
End If
'
ActiveSheet.ShowAllData
On Error Resume Next
myRange.AutoFilter Field:=19, Criteria1:="="
myRange.AutoFilter Field:=18, Criteria1:="<>"
If myRange.SpecialCells(xlCellTypeVisible).Count > 0 Then
myRange("$R1:$R" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("$A1:$A" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Else: ActiveSheet.ShowAllData
End If
'
ActiveSheet.ShowAllData
On Error Resume Next
myRange.AutoFilter Field:=19, Criteria1:="="
myRange.AutoFilter Field:=18, Criteria1:="<>"
myRange.AutoFilter Field:=12, Criteria1:="<>"
If myRange.SpecialCells(xlCellTypeVisible).Count > 0 Then
myRange("$L1:$L" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
myRange("$A1:$A" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Else: ActiveSheet.ShowAllData
End If
'
ActiveSheet.ShowAllData
On Error Resume Next
myRange.AutoFilter Field:=18, Criteria1:="="
myRange.AutoFilter Field:=12, Criteria1:="<>"
If myRange.SpecialCells(xlCellTypeVisible).Count > 0 Then
myRange("$L1:$L" & lr).SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
myRange.SpecialCells(xlCellTypeVisible).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Else: ActiveSheet.ShowAllData
End If
'
ActiveSheet.ShowAllData
myRange("$A1:$A" & lr).AutoFilter Field:=1, Criteria1:=RGB(255 _
, 0, 0), Operator:=xlFilterCellColor
Sheets("Sheet2").Select
Sheets("Sheet2").Copy After:=Sheets(2)
Sheets("Sheet2 (2)").Select
Range("$A1:$A").AutoFilter Field:=1, Operator:= _
xlFilterNoFill
Rows("1:1").Select
Selection.EntireRow.Hidden = True
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Delete Shift:=xlUp
ActiveWorkbook.Worksheets("Sheet2 (2)").AutoFilter.Sort.SortFields.Clear
ActiveSheet.ShowAllData
Rows("1:1").Select
Selection.EntireRow.Hidden = False
Sheets("Sheet2 (2)").Name = "Missing Dates"
Cells.Select
Bookmarks