Hi All
I have the following code that clears the contents of a row based on the text in cell G. However I need the code to clear contents of the row but exclude anything in Column A and N.
Any help would be most appreciated.
Thanks
Tom
I have the following code that clears the contents of a row based on the text in cell G. However I need the code to clear contents of the row but exclude anything in Column A and N.
Code:
Sub ClearIncorrectRows()Dim lRw As Long, n As Long
lRw = Range("G" & Rows.Count).End(xlUp).Row
For n = 1 To lRw
If Range("G" & n).Value = "DELETE ROW" Then Range("G" & n).EntireRow.ClearContents
Next n
End Sub
Any help would be most appreciated.
Thanks
Tom