VBA PasteSpecial

kgkev

Well-known Member
Joined
Jun 24, 2008
Messages
1,281
Office Version
  1. 365
Platform
  1. Windows
I'm trying to do a paste special but can't get the syntax right (I think

Code:
Sub UpdateSubReport()

Sheets("Stop List").Cells.Delete

Dim item As Range
For Each item In Sheets("Debt Report").Range("O11", Sheets("Debt Report").Range("O65000").End(xlUp))
    If item.Value = 1 Then
        item.EntireColumn.Resize(, 10).Copy
        Sheets("Stop List").Range("A65000").End(xlUp).Offset(1).PasteSpecial Paste:=xlPasteValues
    End If
Next item
End Sub

just trying to copy all rows that have a 1 in the O column.

It wo
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,427
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
You can only copy an entire column to a cell in row 1.
 
Upvote 0

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
not sure you have the correct area for copy - maybe this

Code:
        item.EntireRow.Resize(, 10).Copy
        LR = Sheets("Stop List").Cells(Rows.Count, 1).End(xlUp).Row
        Sheets("Stop List").Range("A" & LR + 1).PasteSpecial Paste:=xlPasteValues
 
Upvote 0

Forum statistics

Threads
1,191,553
Messages
5,987,240
Members
440,086
Latest member
Mahi786

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
Top