<code>I am using a filter to remove unwanted clutter. I then need to fill in column G and H, but only if there is a usable row. I am having troubles with row just below the filters. If the first visible row below the filters is blank, it needs to exit the sub.
</code><code> </code>
HTML:
Sub selectDirty()
Rows("1:1").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$L$669").AutoFilter Field:=9, Criteria1:="=*Drty*" _
, Operator:=xlAnd
Dim myHRange As Range
If Range("A2").CurrentRegion.SpecialCells(xlCellTypeVisible) = "" Then
Exit Sub
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Name = "base"
ActiveSheet.Range("base").Offset(0, 7).Select
Selection.Value = "Failure"
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Name = "base"
ActiveSheet.Range("base").Offset(0, 6).Select
Selection.Value = "Equipment"
End Sub