+ Reply to Thread
Results 1 to 8 of 8

Copy and paste to every nth column

  1. #1
    Registered User
    Join Date
    03-28-2012
    Location
    Istanbul
    MS-Off Ver
    Excel 2010
    Posts
    43

    Copy and paste to every nth column

    Hello friends,

    I could not figure out the tweak with my limited understanding of VBA. The purpose is to copy a range of cells, like A1:A10 and
    paste it to every 5th column consecutively (paste to 6th,11th,16th,21st nd so on ). The limit to paste loop is 50 so it will copy a1:a10
    and paste it 50 times after every 4 columns.

    I have a code that does that only once but I was not able to tweak it to fit my needs. Thanks alot in advance for any help or direction.


    Please Login or Register  to view this content.
    Last edited by ant1905; 12-18-2014 at 05:52 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,937

    Re: Copy and paste to every nth column

    Try this

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    11-12-2014
    Location
    New York
    MS-Off Ver
    2010
    Posts
    28

    Re: Copy and paste to every nth column

    Try this out.

    Please Login or Register  to view this content.
    Cheers!

  4. #4
    Registered User
    Join Date
    11-12-2014
    Location
    New York
    MS-Off Ver
    2010
    Posts
    28

    Re: Copy and paste to every nth column

    alansidman, you beat me to it!

  5. #5
    Registered User
    Join Date
    03-28-2012
    Location
    Istanbul
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Copy and paste to every nth column

    Thanks alot to alansidman and ExcelClout. Most appreciated , both solutions work flawlessly.

  6. #6
    Registered User
    Join Date
    03-28-2012
    Location
    Istanbul
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Copy and paste to every nth column

    Maybe I was too enthusiastic to mark as solved the last time For future users who might be looking at this thread I had to come back and correct two points and ask for one more tweak.

    alansidman's solution work perfectly except in my case I needed to copy paste a range of cells. I think Alan's code copies the whole column not a range ...like a1:a10
    Excelclouts code copies the range but does the first pasting 1 column short... then starts pasting with correct periods.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,937

    Re: Copy and paste to every nth column

    If you only want A1:A10 copied then change to this

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    03-28-2012
    Location
    Istanbul
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Copy and paste to every nth column

    Perfect! Thanks so much Alan...

+ 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. Replies: 5
    Last Post: 08-01-2014, 04:30 PM
  2. How do I make the copy/paste of one column contingent on the copy/paste of another?
    By Kwasimitsu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-23-2014, 01:51 PM
  3. Replies: 3
    Last Post: 05-22-2013, 01:08 AM
  4. Vba - find next empty column, insert column, copy paste values & copy paste formulas
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2012, 12:43 PM
  5. Save column J only using copy/paste & temporary copy
    By mikeburg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2006, 12:37 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