PDA

View Full Version : Solved: Dynamic Autofill?



debauch
05-31-2007, 08:46 AM
Hello,

How possible is it to have a dynamic autofill?


Selection.AutoFill Destination:=Range("k1:K70")


After I do the first autofill, I would then be filling 71 to 120, then 121 to 160 etc. ?

Bob Phillips
05-31-2007, 09:36 AM
Autofill must include the cell to fill from



Range("K1").AutoFill Destination:=Range("k1:K70")

debauch
05-31-2007, 10:01 AM
Autofill must include the cell to fill from



Range("K1").AutoFill Destination:=Range("k1:K70")


Range("K1")


I have that part as dynamic already


However, ("k1:K70") , is there a way to say something like ("activecell:k70")?

Bob Phillips
05-31-2007, 10:06 AM
Range(Activecell,Cells(70,Activecell.Row)).Autofill

debauch
05-31-2007, 10:12 AM
Range(Activecell,Cells(70,Activecell.Row)).Autofill

The .Autofill comes up as argument not optional.

mdmackillop
05-31-2007, 10:27 AM
ActiveCell.AutoFill Range(ActiveCell, Cells(70, ActiveCell.Column))

debauch
05-31-2007, 10:41 AM
Ok , great.


ActiveCell.AutoFill Range(ActiveCell, Cells(70, ActiveCell.Column))
this worked out great for filling from the active cell. How possible is to have the 70 part , dynamically fill to the end of the column to the left of it instead of just 70?

mdmackillop
05-31-2007, 11:09 AM
ActiveCell.AutoFill Range(ActiveCell, Cells(Rows.Count, _
ActiveCell.Column - 1).End(xlUp).Offset(, 1))


Of course, if the data in the adjacent column is continous, you just need to double click the Fill button of the active cell.

Bob Phillips
05-31-2007, 11:51 AM
Range(Activecell,Cells(70,Activecell.Row)).Autofill

The .Autofill comes up as argument not optional. I answered the question, you were supposed to combine it with my previous reply.

debauch
06-01-2007, 06:58 AM
Thank-you. I was able to join the feed with the additional columns. Solved.