+ Reply to Thread
Results 1 to 4 of 4

Copy range x times

  1. #1
    Registered User
    Join Date
    07-27-2018
    Location
    Costa Rica
    MS-Off Ver
    MS Office 2016
    Posts
    17

    Copy range x times

    Hello Team,

    I am working on a little project and trying to copy a range, x amount of times. This is what I have:

    Please Login or Register  to view this content.

    So "LastColumn" is the number of times I want to copy the range.

    The range can vary all the time so I just made it automatically with xlToRight. However for example I have the following:

    G7 H7 I7
    E2VA17 E2VA16 E2VA14

    and the code just does this:

    E2VA17
    E2VA17
    E2VA17
    E2VA16
    E2VA16
    E2VA16
    E2VA14
    E2VA14
    E2VA14

    Its kinds good however I need it pasted it like this(lets say that LastColumn = 3, it should copy the range 3 times):

    E2VA17
    E2VA16
    E2VA14
    E2VA17
    E2VA16
    E2VA14
    E2VA17
    E2VA16
    E2VA14


    I really would appreciate any kind of help.

    Regards,
    Luis V.

  2. #2
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    997

    Re: Copy range x times

    Try this:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-27-2018
    Location
    Costa Rica
    MS-Off Ver
    MS Office 2016
    Posts
    17

    Re: Copy range x times

    Hi Akuini,

    Thanks for your reply, it worked awesome, however I failed with my calculation because I actually needed to use "LastRow" instead of "LastColumn" as the number of times I want to copy and paste the range.

    Please Login or Register  to view this content.
    If I change x in your code it mess it all Can you help me with that?

    I tried but failed:

    Please Login or Register  to view this content.



    Thanks in advance.

  4. #4
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    997

    Re: Copy range x times

    Not sure I understand.
    Let's say the last row with data in col A is row 10, do you mean you want to copy the range 2 times?
    Try this:

    Please Login or Register  to view this content.

+ 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. [SOLVED] Copy and Paste Range Down X times
    By Hyperdude in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2018, 03:38 AM
  2. [SOLVED] Copy range # of times based on cell value.
    By countryfan_nt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-25-2018, 04:08 AM
  3. copy range from one sheet to another and then copy 5 times skipping ten rows
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-13-2015, 01:35 PM
  4. [SOLVED] copy range value x times in another sheet
    By nikenis in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2013, 11:14 PM
  5. [SOLVED] Copy and paste a range x many times
    By acsta14 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-20-2012, 07:15 AM
  6. Copy a Range multiple times
    By alocke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2011, 12:29 AM
  7. Copy range several times less first row
    By markos97 in forum Excel General
    Replies: 4
    Last Post: 07-28-2010, 08:54 AM

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