Hello!
I have put together a code that does copy data from column A on my first sheet to column A on my second sheet. But I'm having trouble writing in a final line of code that will take the copied data and search and remove any duplicates.
I have tried several codes from various other sources that all seem to return 438 or 1004 errors. Any guidance would be much appreciated.
Sub copycolumns()
Dim lastrow As Long, erow As Long
lastrow = Sheets("CAST INFO LOG").Cells(Rows.Count, 1).End(xlUp).Row
For i = 5 To lastrow
Sheets("CAST INFO LOG").Cells(i, 1).Copy
erow = Sheets("CAST WORK LOG").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Sheets("CAST INFO LOG").Paste Destination:=Worksheets("CAST WORK LOG").Cells(erow, 1)
Next i
Application.CutCopyMode = False
Worksheets("CAST WORK LOG").Range("A").RemoveDuplicates Columns:=Array(1), Header:=xlYes
End Sub
Bookmarks