+ Reply to Thread
Results 1 to 13 of 13

Copying info from row into the next four rows and then doing the same for remainder

  1. #1
    Registered User
    Join Date
    01-03-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2010
    Posts
    7

    Copying info from row into the next four rows and then doing the same for remainder

    I have a large spreadsheet full of data where the first line (and every 5th line after that) has information that I want to be copied into the next 4 rows and then moving onto the next record (which is on the 6th row) and so on until it reaches the end of the document. I was wondering if it was possible to complete this task using a macro?

    Thanks

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Copying info from row into the next four rows and then doing the same for remainder

    Can you post a workbook with what the final result looks like?

  3. #3
    Registered User
    Join Date
    01-03-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Copying info from row into the next four rows and then doing the same for remainder

    I cannot post the exact workbook due to security restraints. I can put together a random workbook to give you an idea if necessary. I guess I wasn't too clear. Its basically one column that has information in a row that I want copied to the next 4 rows and then move through the workbook to row 6 and perform the copy of information from row 6 to rows 7,8,9, and 10 and so on until it reaches a blank cell.

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Copying info from row into the next four rows and then doing the same for remainder

    I just need a sample workbook with dummy data since all you need is what the macro will look like right?

  5. #5
    Registered User
    Join Date
    01-03-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Copying info from row into the next four rows and then doing the same for remainder

    Let me know if this is ok. Haven't uploaded here before.

    thanks
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Copying info from row into the next four rows and then doing the same for remainder

    Selection the area where you want to fill the, then run the macro

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-03-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Copying info from row into the next four rows and then doing the same for remainder

    Simple enough. Thank you!

  8. #8
    Registered User
    Join Date
    01-03-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Copying info from row into the next four rows and then doing the same for remainder

    One thing I noticed when I was running the macro on my workbook was that it wouldn't take into account an empty cell. It would continue to fill the all the cells with the same information until it saw something different. For instance from my "dummy" workbook say EX_COL_C was blank it would fill EX_COL_B all the way down until it 'sees' EX_COL_D. Is there a remedy for that?

  9. #9
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Copying info from row into the next four rows and then doing the same for remainder

    Post a workbook.

  10. #10
    Registered User
    Join Date
    01-03-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Copying info from row into the next four rows and then doing the same for remainder

    New workbook example.
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Copying info from row into the next four rows and then doing the same for remainder

    The new workbook looks exactly the same as the one you provided before. The original macro will give you the result.

  12. #12
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,707

    Re: Copying info from row into the next four rows and then doing the same for remainder

    If it is like you mentioned in your first post, every 5 rows, try this


    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    01-03-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Copying info from row into the next four rows and then doing the same for remainder

    JieJenn.. If you notice on the workbook that the bottom is different because it is missing the EX_COL_C record. Whereas the first workbook that I posted had that record in there

+ 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