+ Reply to Thread
Results 1 to 5 of 5

Dynamic Auto Fill as part of a Macro

  1. #1
    Registered User
    Join Date
    12-07-2010
    Location
    Winchester, UK
    MS-Off Ver
    Excel 2007
    Posts
    2

    Dynamic Auto Fill as part of a Macro

    I am trying to compile a macro which prepares a series of reports.
    Part of this is to select cell A2 and then double click the autofill handle, when it will then copy it down to the end (column B contains data, column A is empty, but excel knows when I double click the autofill handle in Cell A2 to stop at the cell adjacent to the last row of data in column B)
    When I record this action in the macro, it places a range, which is relevant to this set of data only (A2:A9565), as the number of rows of data will change each time I prepare this sheet.
    Can anyone help me so that the macro carries out the same action as if I were to simply double click the autofill handle.
    Your help is very much appreciated.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Dynamic Auto Fill as part of a Macro

    Hi,

    Maybe something like this:

    Please Login or Register  to view this content.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    12-07-2010
    Location
    Winchester, UK
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Dynamic Auto Fill as part of a Macro

    Quote Originally Posted by Domski View Post
    Hi,

    Maybe something like this:

    Please Login or Register  to view this content.

    Dom
    Works perfectly, thank you so much, your resolution is far more useable than the one from my IT support, ;-)

    Thank you again.

    Jacob

  4. #4
    Registered User
    Join Date
    12-16-2010
    Location
    Texas, United States
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Dynamic Auto Fill as part of a Macro

    I had this same problem, but I was wondering if you can take this one step further and have the macro automatically extend the formula down as you add new data?

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Dynamic Auto Fill as part of a Macro

    Hi,

    That's a quite different issue but quite possible. Per the rules I suggest you start a new thread referencing this one if you think it's relevant.

    Dom

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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