Copy every 3rd cell, define destination range for paste
Hi all,
I'm trying to copy every third cell of column c starting at C16, and paste into column C of the next blank row of a separate workbook. This code below kind of works but it errors where I've defined the 'pasterange' in the other workbook (I think this is incorrect but you know what I'm trying to achieve!). Can anyone help?? :-) Also I don't know how to set the code to copy from C16 to nrows - if it copies from the bottom i need to go up a row, copy that, then copy every 3rd. Column C looks like this... 35467 <---- (Row 16) text 1 BLANK 84950 text 2 BLANK 24967 text 3 BLANK I need all the numbers... Code below Dim pasterange As Range Dim i As Long Set pasterange = Windows("LFmacro.XLS").Sheets("Report").Range("A65 536").End(xlUp).Offset(2) LastRow = Cells(Rows.Count, 3).End(xlUp).Row For i = 1 To LastRow Step 2 pasterange = Cells(i, 1) Next i |
Copy every 3rd cell, define destination range for paste
|
All times are GMT +1. The time now is 05:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com