Instead of
Range("A" & r & ":S" & r).Select
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
Try:
With Range("A" & r , "S" & r).Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
Instead of
Range("A" & firstrow & ":A" & lastrow).Select
Selection.clearcontents
Range("R" & firstrow & ":S" & lastrow).Select
Selection.clearcontents
Range("A" & firstrow & ":S" & lastrow).Select
Selection.Interior.ColorIndex = xlNone
Try:
Range("A" & firstrow , "A" & lastrow).ClearContents
Range("R" & firstrow , "S" & lastrow).ClearContents
Range("A" & firstrow , "S" & lastrow).Interior.ColorIndex = xlNone
Bookmarks