This is a discussion on Migrating from Copy - Destination to Paste Values within the Excel Questions forums, part of the Question Forums category; I'm new to VBA . I have a simple snippet, it uses Copy Destination...however I need to paste VALUES. I ...
I'm new to VBA. I have a simple snippet, it uses Copy Destination...however I need to paste VALUES. I believe I can't use destination in order to do this, however all of my attempts have caused issues. Any thoughts on a simple fix? Thanks!
Code:Sub MoveSC() Dim i As Variant Dim endrow As Integer Dim CL As Worksheet, SC As Worksheet 'clears contents of scorecard Worksheets("Scorecard").Activate ActiveSheet.Range("A1:AA50").ClearContents Set CL = ActiveWorkbook.Sheets("Control") Set SC = ActiveWorkbook.Sheets("Scorecard") endrow = CL.Range("A" & CL.Rows.count).End(xlUp).row For i = 2 To endrow If CL.Cells(i, "M").Value = "1" Then CL.Cells(i, "M").EntireRow.Copy Destination:=SC.Range("A" & SC.Rows.count).End(xlUp).Offset(1) End If Next End Sub
Last edited by Jerry Sullivan; Apr 21st, 2017 at 04:23 PM. Reason: added code tags
Welcome to MrExcel,
To do that, you would replace that statement with two statements:
Code:CL.Cells(i, "M").EntireRow.Copy SC.Range("A" & SC.Rows.count).End(xlUp).Offset(1).PasteSpecial(xlPasteValues)
Using Excel 2016