View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Simon[_2_] Simon[_2_] is offline
external usenet poster
 
Posts: 89
Default Using .Row help please

On Aug 5, 4:19*pm, Dave Peterson wrote:
You just want to copy the last 2 rows to the bottom of the range?

Dim RngToCopy as range
dim DestCell as range

with activesheet
* set rngtocopy = .cells(.rows.count,"A").end(xlup).offset(-1,0)
* set destcell = .cells(.rows.count,"A").end(xlup).offset(1,0)
end with

rngtocopy.resize(2,1).entirerow.copy _
* destination:=destcell





Simon wrote:

Each month I add 2 rows from the bottom of the previous month.


To do this I would like some assistance please.


I thought it would encompass


Range [A36636].Select
Selection.End(xlUp).Offset(-1, 0).Row


'then somehow select the bottom two used rows and copy them directly
underneath the copied rows


Thanks for your help. *Unfortunately I have ye tto learn much about
the Row property.


Regards,


Si


--

Dave Peterson- Hide quoted text -

- Show quoted text -


Hi Dave,

It works, you are a genius!

Does the A in cells(.rows.count,"A").end(xlup).offset(-1,0) refer to
column A?

What does Resize(2, 1) do? thanks.