+ Reply to Thread
Results 1 to 10 of 10

increment formula by 1 after 3 rows with drag function

  1. #1
    Forum Contributor
    Join Date
    04-18-2011
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    105

    increment formula by 1 after 3 rows with drag function

    hi i presume this is something simple but cant seem to figure out

    how can i keep formula in 3 rows same & increment by 1 thereafter using drag down.
    test file attached

    thank you
    Attached Files Attached Files
    Last edited by nd4spd; 01-28-2018 at 06:01 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: increment formula by 1 after 3 rows with drag function

    One way;

    =INDEX(data!$A$2:$A$6,1+INT((ROWS(A$2:A2)-1)/3))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    04-18-2011
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    105

    Re: increment formula by 1 after 3 rows with drag function

    Excellent Thank you Glenn

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: increment formula by 1 after 3 rows with drag function

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: increment formula by 1 after 3 rows with drag function

    You're welcome and thanks for the rep.

  6. #6
    Forum Contributor
    Join Date
    04-18-2011
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    105

    Re: increment formula by 1 after 3 rows with drag function

    Thank you José what would i need to alter in "=INDIRECT("data!A"&INT((ROW(A2)+1)/3)+1) " to increment after 4 rows

  7. #7
    Forum Contributor
    Join Date
    04-18-2011
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    105

    Re: increment formula by 1 after 3 rows with drag function

    Quote Originally Posted by José Augusto View Post
    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thank you José what would i need to alter in "=INDIRECT("data!A"&INT((ROW(A2)+1)/3)+1) " to increment after 4 rows

  8. #8
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: increment formula by 1 after 3 rows with drag function

    For step 4 try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: increment formula by 1 after 3 rows with drag function

    Comment removed by GK
    Last edited by Glenn Kennedy; 01-28-2018 at 08:21 AM.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: increment formula by 1 after 3 rows with drag function

    Just for fun... I ran the two formulae suggested above, and another old favourite of mine (based on OFFSET, another volatile function) through shg's formula speed checker. The results were only partly as i had expected.

    =INDIRECT("'data'!A"&INT((ROW(A2)-2)/3)+1)
    =INDEX(data!A$1:$A$20,1+INT((ROWS(D$2:D2)-1)/3))
    =OFFSET(data!$A$1,INT((ROWS($A$2:A2)-1)/3),,,)

    based on 20 data cells and each formula copied down 60 rows.

    The INDIRECT formula was (as I had expected) slowest. It's also volatile and will recalculate every time something changes on the sheet.

    The INDEX formula was faster (almost exactly 3 times faster than INDIRECT), again, much as I had expected. It has the advantage of being non-volatile and does not recalculate.

    The surprise was the OFFSET formula. It was faster than INDEX, clocking in at almost exactly 4 times faster than INDIRECT. I guess it ultimately loses out as a result of its volatility, but I had not expected it to be the fastest to calculate.

    On a learning curve...

    Edit: Since one of the big advantages of INDIRECT is its ability to use a cell reference as a source for the target sheet name, I re-ran the speed test, picking up the sheet name (data) from a cell reference, rather than being hard coded in the formula. It was almost exactly as fast (or as slow... depending on you PoV) as the original INDIRECT formula. Formula used: =INDIRECT("'"&$J$8&"'!A"&INT((ROW(H2)-2)/3)+1)
    Last edited by Glenn Kennedy; 01-28-2018 at 08:56 AM.

+ 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. Is it possible to increment month within formula using drag down?
    By ids in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2016, 07:12 AM
  2. Drag Copy Increment Understanding
    By ECEUK in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-14-2015, 09:24 AM
  3. Drag formula increment by more than 1
    By hc91 in forum Excel General
    Replies: 2
    Last Post: 09-03-2014, 11:27 AM
  4. [SOLVED] Drag formula increment more than 1
    By bazza321 in forum Excel General
    Replies: 11
    Last Post: 09-03-2014, 11:03 AM
  5. [SOLVED] How to Auto Increment the ROWS Function Horizontally
    By Statto in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-21-2014, 04:33 PM
  6. Drag increment issue
    By atallah.hadi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-16-2013, 06:23 AM
  7. [SOLVED] Increment Sheets, but keep cell reference the same on drag
    By Alostsoul in forum Excel General
    Replies: 7
    Last Post: 02-28-2013, 04:38 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