Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: AutoFill Formulas Easy one

  1. #1
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    In my code I have
    Selection.AutoFill Destination:=Range("E2:G1029")
    can I change that so it fills down to however many rows I have whether it be 1029 or 65000,
    because my data changes all the time?
    I can't think today.

  2. #2
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-08 14:08, brettvba wrote:
    In my code I have
    Selection.AutoFill Destination:=Range("E2:G1029")
    can I change that so it fills down to however many rows I have whether it be 1029 or 65000,
    because my data changes all the time?
    I can't think today.
    Hi,

    Try,

    lastrow = Cells(Rows.Count, "D").End(xlUp).Row

    Selection.AutoFill Destination:=Range("E2:G" & lastrow)

    Untested, but should work.

    Bye,
    Jay

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yeah that works great thanks

  4. #4
    New Member
    Join Date
    Apr 2002
    Location
    Centerville, Indiana
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks Jay. I had a similar question but all the answers I found seemed too complicated for this rookie. Spent 1 1/2 hours trying to apply them. Took 5 minutes on this and it works great!

    [ This Message was edited by: First Wob on 2002-04-09 18:16 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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