I am successfully copying and pasting a table of external links onto another table as only values, however I need to continue this process without overwriting the old data. The code is not receiving any errors, but when I run it, it's pasting the new data over the old data still even though I added in the "lastrow" comment. I've used this before when I use the normal paste code, but this is my first time trying to use pastespecial so I suspect it has to do with that, but I have not been able to figure out what to do. My code is below:
Sub Check() 'compares old and new values
If Worksheets("Test").Range("N2").Value <> Worksheets("Test").Range("N5").Value Then
Worksheets("Test").Activate
Worksheets("Test").Range("TestTable").Select
Selection.Copy
Worksheets("Sheet1").Activate
Worksheets("Sheet1").Range("Destination" & lastrow).PasteSpecial xlPasteValues
ElseIf Worksheets("Test").Range("O2").Value <> Worksheets("Test").Range("O5").Value Then
Worksheets("Test").Activate
Worksheets("Test").Range("TestTable").Select
Selection.Copy
Worksheets("Sheet1").Activate
Worksheets("Sheet1").Range("Destination" & lastrow).PasteSpecial xlPasteValues
End if
Can someone please help me figure out what I am missing to paste the data in the next available row?