View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Meltad Meltad is offline
external usenet poster
 
Posts: 98
Default Copying every other row

Hi Don,
Thanks for your reply, I tried this out but think I've broken the code onto
a new row or something...
Is it supposed to be 2 lines of code both starting with Cells??

I get an error on this line:
Cells(i, "C").Copy Sheets("dest").Cells(Cells(Rows.Count, "C").End(xlUp).Row
+ 1, "C")

I changed all the "A" to "C" - I assume this is right if I'm working with
Column C, also, how does it know to stop at C16??

I just want to get this to copy at the moment, I've got code now to paste
into the next blank row in the destination spreadsheet.
Thanks



"Don Guillett" wrote:

might be best to work from the bottom up, something like

for i= cells(rows.count,"a").end(xlup).row to 1 step -3
cells(i,"a").copy sheets("dest").
cells(cells(rows.count,"a").end(xlup).row+1,"a")
next i

--
Don Guillett
SalesAid Software

"Meltad" wrote in message
...
Hi,

Starting in cell C16 I need to copy every 3rd cell in column C until there
is no more data. How do I copy cell C16 , offset down 2 cells, copy again
etc
etc until blank.

I then need to paste all these values into column C of another worksheet
("LFmacro.xls" sheet name "report") - BUT this worksheet already has data
in
it so would need to paste into the next blank row (or leave a blank row
and
paste into the next would be useful)

Can anyone help me?