Migrating from Copy - Destination to Paste Values

zyry0301

New Member
Joined
Apr 21, 2017
Messages
1
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
[B]           CL.Cells(i, "M").EntireRow.Copy Destination:=SC.Range("A" & SC.Rows.count).End(xlUp).Offset(1)[/B]
        End If
    Next
End Sub
 
Last edited by a moderator:

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
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)
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,378
Members
448,955
Latest member
BatCoder

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top