Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    May 2002
    Location
    US
    Posts
    439
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro - Copy and fill down (2003)

    Greetings!

    I have a question (and an attached file). What I need is to copy a cell (A6), and fill the formula down. However, For the Column it is in, I cannot locate the end of the data. The column C starting at C6 is always filled. Therefore it can be used to determine the end of the data.

    What is the best method to accomplish this? I would like to have a macro, which I will later incorporate into the existing autorun macros I already have for this spreadsheet.



    Thanks,
    Brad
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro - Copy and fill down (2003)

    For example:

    Sub FillA()
    Dim m As Long
    m = Range("C65536").End(xlUp).Row
    Range("A6:A" & m).FillDown
    End Sub

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Macro - Copy and fill down (2003)

    How about the line:

    <pre> Range("A6").Copy _
    Destination:=Range(Range("c6"), Range("C65536").End(xlUp)).Offset(0, -2)</pre>


    Steve

  4. #4
    4 Star Lounger
    Join Date
    May 2002
    Location
    US
    Posts
    439
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro - Copy and fill down (2003)

    Guys,

    Thanks much... does what is needed.


    Have a great weekend!


    Brad

Posting Permissions

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