goto next line

A

~Alan

XL2000
I have a macro that cuts and past special.
is there a code that I can add to this macro that will go to the next line
down if the first one is full

lets start at J17 thru M17
ok I select the macro and it copies and past into J17 thru M17
now when I select the macro again I want the information to go to
J18 thru M19 and so on
 
D

Don Guillett

something like this perhaps
x=cells(rows.count,"J").end(xlup).row+1
range("a17:m17").cut range("j" & x)
 
D

Dave Peterson

I like to start at the bottom of the worksheet and lookup to find the next
available row.

Dim DestCell as range
dim RngToCopy as range

with worksheets("sheet1")
set rngtocopy = .range("a9:d9")
end with

with worksheets("sheet2")
set destcell = .cells(.rows.count,"J").end(xlup).offset(1,0)
end with

rngtocopy.copy
destcell.pastespecial paste:=xlpastevalues
 
Top