+ Reply to Thread
Results 1 to 6 of 6

Loop-copy cell values from a row, and then copy them into a column

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    Cambridge
    MS-Off Ver
    Excel 2003
    Posts
    3

    Question Loop-copy cell values from a row, and then copy them into a column

    Hello friends!

    I was wondering if anyone knew how to write a macro that would do the following (see attached sheet):
    1. select the first four cells from row 2
    2. copy their values
    3. paste these values into row 6
    4. select next four cells from row 2
    5. copy them as well
    6. paste them into row 7 (aligned exactly below the values from step 3)
    7. select next four cells from row 2, etc.
    ...
    loop this until all the values from row 2 have been copied...

    If you look at the attached file it might be more obvious what I mean.
    Thanks a lot for any help - I'm assuming this is not difficult to do for someone who knows how to script macros, but for me it's pure alchemy I've been trying to figure this out for an hour, but to no avail...
    Attachment: Book1.xlsx

  2. #2
    Registered User
    Join Date
    11-14-2012
    Location
    Brooklyn, NY
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Loop-copy cell values from a row, and then copy them into a column

    Please see attached file i've done it with a simple formula, as you enter more information pull the formula further down

    Let me know if it helped

    Thank you
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-14-2012
    Location
    Cambridge
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Loop-copy cell values from a row, and then copy them into a column

    Amazing! This is exactly what I needed - thanks so much!

    Could you tell me how the code works (decompose it), just so I can modify and tweak it if need come?

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Loop-copy cell values from a row, and then copy them into a column

    Try this...

    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Loop-copy cell values from a row, and then copy them into a column

    Try this...

    Please Login or Register  to view this content.
    Edit: too late as usual.

  6. #6
    Registered User
    Join Date
    11-14-2012
    Location
    Cambridge
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Loop-copy cell values from a row, and then copy them into a column

    Cheers, Alpha! Thanks for the second method - always good to have several ways of doing things.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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