This is a better version of the code. A little longer but a) it will only change the OPEN lines; b) if you run it twice it doesn't mess up the header; and c) it removes the Autofilter
Sub test()
Application.ScreenUpdating = False
With Range("D2")
.AutoFilter
.AutoFilter Field:=4, Criteria1:="OPEN"
End With
If Intersect(Range("D2:D" & Range("D" & Rows.Count).End(xlUp).Row), _
Range("D1").CurrentRegion, _
Range("D1").SpecialCells(xlCellTypeVisible)).Cells.Count = 1 _
Then
Range("D2").AutoFilter
Exit Sub
End If
For Each cell In Intersect(Range("D2:D" & Range("D" & Rows.Count).End(xlUp).Row), _
Range("D1").CurrentRegion, _
Range("D1").SpecialCells(xlCellTypeVisible))
' Debug.Print cell.Address
cell.Value = "SVOD_C_I_W" ' D
cell.Offset(0, 1) = "Y" ' E
cell.Offset(0, 2) = "Y" ' F
cell.Offset(0, 3) = "N" ' G
Next 'cell
Range("D2").AutoFilter
Application.ScreenUpdating = True
End Sub
Regards
Bookmarks