+ Reply to Thread
Results 1 to 4 of 4

Dynamic autofill VBA

  1. #1
    Registered User
    Join Date
    03-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    18

    Dynamic autofill VBA

    Hi,

    I have a document where I every month collect a lot of data in columns A:J.

    In column K, I have a formula which I want to autofill from cell K2 until the last row (row 1 are just headers..) The formula is already typed into K2.

    The volume of data varies from month to month. So I want the macro to be dynamic.

    If there is data from row 2 until row 50 I want the formula to be autofilled until row 50 only.

    If there is data from row 2 until row 70, autofilled until row 70...

    Any suggestions how to do this?

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Dynamic autofill VBA

    Hi
    try this macro

    this assumes that only cells K1 and K2 are populated in column K - there is no need to delete old values
    is this correct?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-08-2008
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    6

    Re: Dynamic autofill VBA

    Hope this can help in one or anoher way.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Dynamic autofill VBA

    Thank you guys!

    I actually used both of your solutions in my model, and both macros are helping me to do exactly what I wanted them to do! :-)

+ 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