copy and paste using vb code

A

ASU

Please help me!!!
How do I paste, using vb code, a cells formula to the next empty cell in the
same column?
Thank you.
 
D

Dave Peterson

Dim myCell as range
dim DestCell as range

set mycell = range("somecellthatyouwanttocopy")

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

mycell.copy
destcell.pastespecial paste:=xlpasteformulas

=====
Something like this actually pastes to the cell under the last used cell in the
column.
 
Top