+ Reply to Thread
Results 1 to 3 of 3

Automate AutoFill in Column

  1. #1
    JTF
    Guest

    Automate AutoFill in Column

    HI all

    I have a formula in cell J2 that needs to be copied down to fill the
    rest of column J. The problem is that the number of rows in the
    worksheet will vary from month to month.

    How do I indicate in the macro that the last row will vary? Thanks


  2. #2
    Registered User
    Join Date
    01-24-2005
    Posts
    63
    Find the last row first

    sub FillDownInJ()

    dim lngLastRow as long

    lngLastRow=Cells(rows.count,"J").end(xlup).Row

    Range("J2:J" & lngLastRow).filldown

    end sub

  3. #3
    Don Guillett
    Guest

    Re: Automate AutoFill in Column

    lastrow=cells(rows.count,"j").end(xlup).row

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "JTF" <[email protected]> wrote in message
    news:[email protected]...
    > HI all
    >
    > I have a formula in cell J2 that needs to be copied down to fill the
    > rest of column J. The problem is that the number of rows in the
    > worksheet will vary from month to month.
    >
    > How do I indicate in the macro that the last row will vary? Thanks
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1