Hi
I'm trying to transfer data when it matches a duplicate number on the "bulk loader" sheet, to the "Tracker" sheet and then delete the data that has been copied in the bulkloader sheet, but not the entire row as formulas are held in the other columns. I get an error using the following code, can you see what i'm doing wrong or is there a better way to do this?
Any help is appreciated.
Sub transfer()
Dim i As Long, j As Long, lastrow1 As Long, lastrow2 As Long
Dim SCode As String
lastrow1 = Sheets("Bulk Loader").Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To lastrow1
SCode = Sheets("Bulk Loader").Cells(i, "A").Value
Sheets("Tracker").Activate
lastrow2 = Sheets("Tracker").Range("D" & Rows.Count).End(xlUp).Row
For j = 2 To lastrow2
If Sheets("Tracker").Cells(j, "D").Value = SCode Then
Sheets("Bulk Loader").Activate
Sheets("Bulk Loader").Range(Cells(i, "U"), Cells(i, "AA")).Copy
Sheets("Tracker").Activate
Sheets("Tracker").Range(Cells(j, "N"), Cells(j, "T")).Select
ActiveSheet.Paste
End If
Next j
Application.CutCopyMode = False
Next i
Sheets("Bulk Loader").Activate
Sheets("Bulk Loader").Range("A1").Select
End Sub
Thanks
Bookmarks