PDA

View Full Version : Solved: auto drag formula



nicko
09-10-2008, 08:19 AM
hi all,

i'm trying to drag a formula down to the end of a column as long as there is text in another column.

this is what I have come up with but it is not working


Range("D7:D").AutoFill Destination:=Range("D7" & Cells(Rows.Count, "C").End(xlUp).Row)


I want to drag down D7 as long as their is data in column C.

Does anyone know where I am going wrong?

Many thanks

Nicko

Bob Phillips
09-10-2008, 08:23 AM
Range("D7").AutoFill Destination:=Range("D7").Resize(Cells(Rows.Count, "C").End(xlUp).Row - 6)

nicko
09-10-2008, 08:29 AM
many thanks! works perfectly