Tomas mcD,
Based on the excel sample workbook you provided, I updated the macro to the following:
Sub FilterMacro_for_Tomas_mcD()
Dim rngID As Range: Set rngID = Range("A2", Cells(Rows.Count, "A").End(xlUp))
Dim IDCell As Range, RowsToHide As Range
For Each IDCell In rngID
If IDCell.Value = vbNullString _
Or IDCell.Offset(1, 0).Value = vbNullString _
And IDCell.Offset(1, 2).Value <> vbNullString Then
Else
If RowsToHide Is Nothing Then
Set RowsToHide = IDCell
Else
Set RowsToHide = Union(RowsToHide, IDCell)
End If
End If
Next IDCell
RowsToHide.EntireRow.Hidden = True
End Sub
Hope that helps,
~tigeravatar
Bookmarks