Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy paste code fails
In using the attached code the code stops after coping & pasting the 1st
line of the 2nd last sheet. Any clever ideas guys ? Dim r As Integer ' ''''''''''''''''''''''''''''''''from row 2 r = 2 Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets Dim Rng As Range Dim i As Range Set Rng = ws.Range("K2", ws.Range("K" & ws.Rows.Count).End(xlUp)) For Each i In Rng If i = "" Then i.EntireRow.Copy SHT.Range("K" & Rows.Count).End(xlUp)(r). _ EntireRow.PasteSpecial r = r + 1 End If Next i Next ws |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why Copy/Paste fails using Offset & Resize of myRange? | Excel Discussion (Misc queries) | |||
copy and paste using vb code | Excel Discussion (Misc queries) | |||
Filter Copy/Paste Fails - Two Ranges Selected? | Excel Programming | |||
Help-Copy&Paste code | Excel Programming | |||
Need Help with Code - Copy & Paste | Excel Programming |