macro propagate

  • Thread starter ~Alan Rosenberg Miami
  • Start date
A

~Alan Rosenberg Miami

XL-2000
Is there away to have this macro propagate
Like if "C18:C19" is occupied then start +1 row down?

Sub copypast()
' Macro recorded 7/10/2003 by A
Range("A14:L16").Select
Selection.AutoFill Destination:=Range("A14:L19"),
Type:=xlFillDefault
Range("A14:L19").Select
Range("C18:C19").Select
Selection.ClearContents
End Sub
 
A

~Alan Rosenberg Miami

well the code says copy and past in the same place
I wnat it to copy and past just below the last lines of information
 
J

J.E. McGimpsey

I guess I'm still being dense - what is the "it" you refer to?

If you mean that you would like to AutoFill the last three filled
lines that have data in column C, to the next three lines and then
clear the last two cells in column C, here's one way:

Public Sub CopyPast()
With Cells(Rows.Count, 3).End(xlUp).Offset(-2, -2)
.Resize(3, 12).AutoFill Destination:=.Resize(6, 12)
.Offset(4, 2).Resize(2, 1).ClearContents
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

moving all data to cell a1 4
Inserting rows and adding to total worksheet 3
Conditional Macro 2
Hard reference in a macro 1
Add row dynamically 15
2 macro help 7
Modify range in VBA 9
Macro Question formula 8

Top