![]()
Option Explicit Sub DoThings() Dim wsN As Worksheet, wsO As Worksheet Dim lrow As Integer, nrow As Integer, i As Integer Dim str As String, str2 As String Dim fndrng As Range Set wsN = ThisWorkbook.Sheets("NEW") Set wsO = ThisWorkbook.Sheets("OLD") lrow = wsN.Range("A:A").Find(what:="*", searchdirection:=xlPrevious).Row nrow = wsO.Range("A:A").Find(what:="*", searchdirection:=xlPrevious).Row + 1 i = 2 Do While i <= lrow Set fndrng = wsO.Range("A:A").Find(what:=wsN.Cells(i, 1)) str = "A" & i & ":F" & i If fndrng Is Nothing Then str2 = "A" & nrow nrow = nrow + 1 Else str2 = "A" & fndrng.Row End If wsN.Range(str).Copy wsO.Range(str2).PasteSpecial xlPasteValuesAndNumberFormats Application.CutCopyMode = False 'Enable the two rows below if you want to delete the row from New after it has been 'processed. Remove the ' to un-comment. Also, if you enable them, delete the row below 'them. ' wsN.Rows(i).Delete ' lrow = lrow - 1 i = i + 1 'Delete this if you enable the two commands above Loop End Sub
Bookmarks