+ Reply to Thread
Results 1 to 7 of 7

Copying and Pasting of every nth Column of Data to a new location in Same Worksheet

  1. #1
    Registered User
    Join Date
    03-07-2016
    Location
    SG
    MS-Off Ver
    2013
    Posts
    7

    Copying and Pasting of every nth Column of Data to a new location in Same Worksheet

    Hi all,

    Im looking to do a macro to copy a range of data (of every nth column) and paste it to another series.

    I have a data set (each comes in 3 columns) comprising of Ch1, Ch2 and Ch3. I would like to group the Ch1, Ch2 and Ch3 separately.

    For Channel 1,
    The macro would aim at copying B2:B21 and copy it to B26:B45, follow by E2:E21 and copy it to C26:45 and so on and so forth.

    For Channel 2,
    The macro would aim at copying C2:C21 and copy it to B49:B68, follow by F2:F21 and copy it to C49:68 and so on and so forth.

    For Channel 3,
    The macro would aim at copying D2:D21 and copy it to B71:B90, follow by G2:E21 and copy it to C71:90 and so on and so forth.

    I have attached an excel sheet with the desired outcome where the data have been separated. Hope someone can help me with a macro as tons of more data are coming.

    Appreciate your help and thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-02-2015
    Location
    delhi
    MS-Off Ver
    2010
    Posts
    104

    Re: Copying and Pasting of every nth Column of Data to a new location in Same Worksheet

    Sort it via Rows and copy it 3times(Ch1,ch2,ch3) easily below simple task to do ?? Do let me know if you wish macro only for doing this

  3. #3
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copying and Pasting of every nth Column of Data to a new location in Same Worksheet

    Please Login or Register  to view this content.
    Kind regards
    Leo
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-07-2016
    Location
    SG
    MS-Off Ver
    2013
    Posts
    7

    Re: Copying and Pasting of every nth Column of Data to a new location in Same Worksheet

    Hi Leo,

    Thanks! It works perfectly.

    However, I have a question should the step be 2 instead of 3 as above, which part of the code do i modify? (eg. there is only Ch1 and Ch2 instead of Ch1, Ch2 & Ch3)

    Thank you for your kind help.

    -Haer

  5. #5
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copying and Pasting of every nth Column of Data to a new location in Same Worksheet

    Nothing to modify, it works with every step.

    Kind regards
    Leo

  6. #6
    Registered User
    Join Date
    03-07-2016
    Location
    SG
    MS-Off Ver
    2013
    Posts
    7

    Re: Copying and Pasting of every nth Column of Data to a new location in Same Worksheet

    Quote Originally Posted by LeoTaxi View Post
    Nothing to modify, it works with every step.

    Kind regards
    Leo
    Thanks Leo!

    One more question, i added a row above the the existing row 1, moving existing row 1 to row 2. When i ran the macro, it seems its compiling vertically down instead of horizontally to the right for the 3 channels.

    I would like to include the added row at the top of the channel number too when copying it down. For eg. Location, Ch1, follow by the values vertically down.

    How do i rectify this?

    Thanks!

    -Haer

  7. #7
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copying and Pasting of every nth Column of Data to a new location in Same Worksheet

    Please Login or Register  to view this content.

    Kind regards
    Leo

+ 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: 2
    Last Post: 09-06-2015, 02:57 AM
  2. Copying data from a row with many columns and pasting with column rearranged
    By ivector in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-03-2014, 07:20 AM
  3. [SOLVED] Copying Data from Pivot and pasting it to specific location
    By dinesh_ltjd in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-22-2014, 06:46 PM
  4. Replies: 7
    Last Post: 10-23-2014, 01:29 PM
  5. Prevent copying and pasting a cell from a column with data validation to another column
    By kieranoduill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-11-2013, 10:02 AM
  6. Replies: 3
    Last Post: 05-09-2012, 07:43 PM
  7. macro or vba code for copying and pasting data from one worksheet to another
    By jruiz13 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-03-2011, 10:05 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