+ Reply to Thread
Results 1 to 6 of 6

copy the same pattern repeatedly while incrementing down only 1 row

  1. #1
    Registered User
    Join Date
    06-17-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    52

    copy the same pattern repeatedly while incrementing down only 1 row

    Hello everyone,
    I cannot seem to figure this one out for the life of me.

    I am trying to copy data via = onto a new spreadsheet. I have the same 5 cell references being repeated down 1 column.

    The problem is. I only want to move down my source data 1 row at a time. Because there are 5 cell references my source data is moving 5 rows at a time.

    I have posted an example spreadsheet of what I am doing. I want to have the 5-cell combination repeaded 1000 times but am trying to prevent from doing it all by hand.

    If anyone can help me I would be extemely greatful.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,051

    Re: copy the same pattern repeatedly while incrementing down only 1 row

    I looked at your file, and the logic you are using to decide what goes where, escapes me

    the references you have on sheet ID seem to completely random? Can you perhaps explain how you arrived at the references that you did?

    B2
    H2
    L2
    L2
    P2
    B3
    H3
    L3
    L3
    P3
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-17-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: copy the same pattern repeatedly while incrementing down only 1 row

    Certainly,
    The cells you reference above are the pattern 2x
    B2
    H2
    L2
    L2
    P2
    is the combination i want to repeat 1,000 times. It is basically 1 piece of a larger picture, which is to use this for an xml table.

    Thanks!

  4. #4
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    Re: copy the same pattern repeatedly while incrementing down only 1 row

    One way is with this formula: =INDIRECT("'original data'!"&B2&A2)
    B2: column number, A2: row number
    The column formula copies what's 5rows up, and the rows formula 5rows up +1.
    //Ola


    ...or without the helper column (and not bound to row 2) if it's better:
    =INDIRECT("'original data'!"&MID("BHLLP",1+MOD(ROW()+(5-ROW($C$2)),5),1)&(1+INT((ROW()+(5-ROW($C$2)))/5)))
    $C$2 is the first formula address.
    Attached Files Attached Files
    Last edited by olasa; 01-26-2013 at 01:20 PM. Reason: Added single cell formula
    Mark the problem as Solved under the Yellow bar up Top right, under Thread Tools, when you received a solution.
    It saves time, to skip already solved threads.

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,675

    Re: copy the same pattern repeatedly while incrementing down only 1 row

    Another way without helper column
    Please Login or Register  to view this content.
    Quang PT

  6. #6
    Registered User
    Join Date
    06-17-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: copy the same pattern repeatedly while incrementing down only 1 row

    Thank you very much for the replies everyone! I am goin to close the thread as the solutions worked great!

+ 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