VBA Copy and Paste Cell Value Only Using Offset Resize

Googles

New Member
Joined
Dec 15, 2017
Messages
32
Hi All Here,
I am having problems with the code listed below, How can I Copy and Paste cell Value only Not the
Formula?
Thanks

Code:
Sub CopyPaste2()    Dim x, R, C, Cols As Long
    Dim rngSource As Range
    Dim wksResult As Worksheet
    Set rngSource = Sheet1.Range("A1:D90")
    Sheet2.Range("B3:P57").ClearContents

    If Not rngSource Is Nothing Then
        Cols = 3
        If Cols > 0 Then
            Application.ScreenUpdating = False
            R = 55
            Set wksResult = Worksheets("Result1")
            For x = 0 To rngSource.Rows.Count Step R
                rngSource.Offset(x).Resize(R, rngSource.Columns.Count).Copy wksResult.Range("B3").Offset(, C)
                C = C + rngSource.Columns.Count
            Next
            Application.ScreenUpdating = True
        End If
    End If
End Sub
 
Last edited:

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Ok. I'm Changed this code:
Thanks
Code:
                rngSource.Offset(x).Resize(R, rngSource.Columns.Count).Copy                wksResult.Range("B3").Offset(, C).PasteSpecial xlPasteValues
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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