I have a macro to copy any rows with a key word from sheet#1 to sheet#2, which works great...The problem is when the information is deleted from the first sheet with the keyword, the second sheet is not updated. I would like the copied row to delete from both sheets if it is deleted from the first sheet. This is mainly an issue when I enter a new row in the first sheet, but then later need to delete it. Sheet#2 does not update and remove the entry. It will only erase if there is additional data to replace it.
Here is the code I am working with now.
Sub Test1()
Application.ScreenUpdating = True
Dim xRow&, NextRow&, LastRow&
NextRow = 11
LastRow = Cells.Find(What:="*", After:=Range("A1"), SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
For xRow = 1 To LastRow
If WorksheetFunction.CountIf(Rows(xRow), "*KEYWORD*") > 0 Then
Rows(xRow).Copy Sheets("SHEET#2").Rows(NextRow)
NextRow = NextRow + 1
End If
Next xRow
Application.ScreenUpdating = True
End Sub
Any help would be appreciated.
Bookmarks