+ Reply to Thread
Results 1 to 8 of 8

Copy consecutive cells to non-consecutive cells

  1. #1
    Registered User
    Join Date
    08-11-2014
    Location
    USA
    MS-Off Ver
    2013 Pro
    Posts
    26

    Copy consecutive cells to non-consecutive cells

    Need help...

    I have two worksheets, sheet1 contains a column of consecutive entries in A1:A20 and sheet2 has 20 groups of data in 13x13 grids with a grid label in the upper left portion of each grid. Grid 1 fills A1:M13, grid 2 fills A14:M26, etc. The grid label is in A1,A14,A27, etc.

    I am trying to populate the entries from sheet1 A1:A20 into sheet2 A1,A14...

    'sheet1'!A1 to 'sheet2'!A1
    'sheet1'!A2 to 'sheet2'!A14
    'sheet1'!A3 to 'sheet2'!A27
    'sheet1'!A4 to 'sheet2'!A40
    'sheet1'!A5 to 'sheet2'!A43
    .
    .
    .

    I have used OFFSET, INDEX with no luck. I seem to get hung up with the ROW function and unfortunately don't have an example formula to post. Obviously I can go back and forth between sheets and paste the exact value but I'm trying to find a method to enter one formula in the sheet2 A1 and copy it down to the non-consecutive cells and maintain the incremental relationship from sheet1.

    Any suggestions are appreciated, thanks.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Copy consecutive cells to non-consecutive cells

    Attach a workbook with sample data and a proposed layout of your solution or what you are trying to accomplish. Give a few SPECIFIC examples and maybe we can assist.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Copy consecutive cells to non-consecutive cells

    Put this formula in cell A1 of sheet2:

    =INDEX('sheet1'!A:A,INT((ROWS($1:1)-1)/13)+1)

    then you can copy/paste it into cells A14, A27 etc., as required.

    Hope this helps.

    Pete

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Copy consecutive cells to non-consecutive cells

    =IF(MOD(ROWS($A$1:A1),13)=1,INDEX(Sheet1!A:A,CEILING(ROWS($A$1:A1)/13,1)),"")
    that will leave blanks in all the rows between
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    08-11-2014
    Location
    USA
    MS-Off Ver
    2013 Pro
    Posts
    26

    Re: Copy consecutive cells to non-consecutive cells

    example.xlsx

    The formula =INDEX('sheet1'!A:A,INT((ROWS($1:1)-1)/13)+1) is working but I wanted to see how to tweak it based on different data locations.

    On sheet1 the grid labels now rest in I6:I25 and the destinations on sheet2 start at A30 then go to A43,A56,etc...

    I'm not quite sure how the operators in the ROW function work.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Copy consecutive cells to non-consecutive cells

    Put this formula in A30:

    =INDEX(Sheet1!I:I,INT((ROWS($1:1)-1)/13)+6)

    then copy it into A43, A56, A69, and so on.

    Note that the formula is now looking at column I on Sheet1, and there is a 6 at the end of the formula as your first item of data is in I6.

    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    08-11-2014
    Location
    USA
    MS-Off Ver
    2013 Pro
    Posts
    26

    Re: Copy consecutive cells to non-consecutive cells

    Worked great, thanks for the assist.

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Copy consecutive cells to non-consecutive cells

    You're welcome - glad it worked for you.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. [SOLVED] non consecutive to consecutive to cells
    By zara_toustra in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2014, 02:11 PM
  2. Replies: 1
    Last Post: 05-29-2013, 10:35 AM
  3. Copy non-consecutive cells to clipboard
    By ukyank in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-25-2013, 02:18 AM
  4. Need to add value of 1 to consecutive cells entire column BUT copy too
    By SLINDSAY in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-19-2013, 09:07 AM
  5. [SOLVED] copy every 30th cell in the column into consecutive cells in anoth
    By shortcuts in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-29-2005, 03:06 AM

Tags for this Thread

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