Consulting

Results 1 to 3 of 3

Thread: Solved: auto drag formula

  1. #1

    Solved: auto drag formula

    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

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Range("D7").AutoFill Destination:=Range("D7").Resize(Cells(Rows.Count, "C").End(xlUp).Row - 6)
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    many thanks! works perfectly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •