View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Fill function to next cells

Carl: I think this is what you need

Sub test()

LastCol = Cells(10, Columns.Count).End(xlToLeft).Column
Set copyrange = Range(Cells(10, LastCol), Cells(20, LastCol))
copyrange.Copy Destination:=copyrange.Offset(0, 1)

End Sub

"carl" wrote:

I have a macro that requires functions in the adjacent cells filled right
every month. So for example cells A10 to A15 need to be copied to cells B10
to B15 this month. But next month the cells from B10 to B15 will need to be
copied to cells C10 to C15. So what I want to do is find the correct cell
and then:

ActiveCell.Select
Selection.Resize(5, 1).Select

But then how do I fill these selected cells right?

Help will be much appreciated.