+ Reply to Thread
Results 1 to 9 of 9

Dynamic AutoFill Destination Range

  1. #1
    Registered User
    Join Date
    01-13-2016
    Location
    Madrid
    MS-Off Ver
    2013
    Posts
    5

    Dynamic AutoFill Destination Range

    Hi all this is my first post i hope i don't make any mistake,

    I need help with this Macro, I can't don't know how to configure the Autofill Destination range to be the cells on right column to the cells selected in the previous statement.

    Thanks in advance for the help.

    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by cesrua; 01-19-2016 at 05:44 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,755

    Re: Dynamic AutoFill Destination Range

    I would find it helpful if you could describe what you want this macro to do. Your code from the macro recorder, and there is usually a better way to code things that what the macro recorder provides.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-13-2016
    Location
    Madrid
    MS-Off Ver
    2013
    Posts
    5

    Re: Dynamic AutoFill Destination Range

    Hi, I'll try my best.

    As you can see its my first Macro. I'm trying to automatize a weekly report and this Macro is used to update a table needed for a chart. Basically i need to perform two actions.

    1- Select cells from rows 50-58 in the column where Actual values are (that moves every week) and insert new cells on its left.
    2- Selects cells from rows 51-58 in the column where last report values are and autofill the column on the right with its formulas.

    I hope this helps for better understanding.
    Last edited by cesrua; 01-13-2016 at 03:47 PM.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,755

    Re: Dynamic AutoFill Destination Range

    If the column with actual values moves every week, how you determine which column it is?

  5. #5
    Registered User
    Join Date
    01-13-2016
    Location
    Madrid
    MS-Off Ver
    2013
    Posts
    5

    Re: Dynamic AutoFill Destination Range

    unnamed.png

    I'm having trouble uploading an image

  6. #6
    Registered User
    Join Date
    01-13-2016
    Location
    Madrid
    MS-Off Ver
    2013
    Posts
    5

    Re: Dynamic AutoFill Destination Range

    As you can see in the Image:

    STATEMENTS EXECUTED IN THE IMAGE
    Statement 1 -> I know cell with value="ACTUAL" is in row 50. So I move to cell A50.
    Statements 2-3 -> Because I have only 3 values (Star, Actual, End) I can select Actual cel with pressing ctrl+right twice.
    Statement 4 -> I can select only cells between rows 50-58 pressing ctrl+sift+down and copy them.
    Statement 5 -> I insert cells moving to the right.

    STATEMENTS TO EXECUTE
    Statement 6-7 -> Because after first 5 statements i know there are blank cells i can reach the las values column by selecting cell A51 and pressing ctrl+right once.
    Statement 8 -> I can select only cells between rows 51-58 pressing ctrl+sift+down.
    Statement 9 -> I need to Autofill the blank cells with the formulas on the range i currently have selected but i don't know how.

    I hope is clearer now, thank you very much.
    Last edited by cesrua; 01-13-2016 at 05:10 PM.

  7. #7
    Registered User
    Join Date
    01-13-2016
    Location
    Madrid
    MS-Off Ver
    2013
    Posts
    5

    Re: Dynamic AutoFill Destination Range

    When the thread closes if there's no answer?

    Thanks

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,755

    Re: Dynamic AutoFill Destination Range

    I think you want this. I have tested this.

    Please Login or Register  to view this content.

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,755

    Re: Dynamic AutoFill Destination Range

    Quote Originally Posted by cesrua View Post
    When the thread closes if there's no answer?
    The thread never closes, unless a Moderator decides to close it for administrative purposes. If you feel that your question has been answered you can mark the thread "solved" but that is not the same as closing it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy from static destination & paste to dynamic destination
    By Marbleking in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-31-2015, 09:31 AM
  2. [SOLVED] Autofill Destination Range
    By ERaasio in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-14-2014, 03:02 PM
  3. Autofill a destination range using last row value
    By jaym911 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-29-2013, 12:07 PM
  4. [SOLVED] AutoFill Destination Unknown Range
    By sperry2565 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-08-2013, 04:53 PM
  5. How to extend Range.AutoFill Destination down an addition 3 rows?
    By BBoydAnchor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-31-2011, 10:51 AM
  6. Autofill in VBA with a dynamic "Destination" range
    By ConneXionLost in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2011, 04:55 PM
  7. Selection.Autofill Destination:=Range(ActiveCell.Value)
    By Shaka215@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-23-2006, 06:20 PM

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