+ Reply to Thread
Results 1 to 11 of 11

How to increment a columns' cell reference by 1, then by 2, then by 1 etc.

  1. #1
    Forum Contributor JulianS96's Avatar
    Join Date
    11-01-2019
    Location
    England
    MS-Off Ver
    365 (work-99%), 2016 (home-1%)
    Posts
    266

    How to increment a columns' cell reference by 1, then by 2, then by 1 etc.

    Hi Forum.

    Just wondering how to increment a cell's reference in a certain pattern.
    From googling I have found out how to increment the cell references consistently using
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    What I want to achieve, however, is to increment the cell reference by 1 for one instance, and then by 2 for the second instance, and then again by 1, then 2 etc...

    The closest formula I found was "Use INDEX():

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

    Where /2 is the repetition wanted and the +2 is the starting row."

    This formula, however, just repeats the same value and then increments by two and then repeats the same value then by 2 again, which is very close.
    Any ideas?
    Attached Files Attached Files

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

    Re: How to increment a columns' cell reference by 1, then by 2, then by 1 etc.

    Try with offset:

    B12:

    Please Login or Register  to view this content.
    Drag down
    Quang PT

  3. #3
    Forum Contributor JulianS96's Avatar
    Join Date
    11-01-2019
    Location
    England
    MS-Off Ver
    365 (work-99%), 2016 (home-1%)
    Posts
    266

    Re: How to increment a columns' cell reference by 1, then by 2, then by 1 etc.

    Perfect works nicely! Thanks bebo!
    If I wanted to modify the cell "jumps" what numbers would I need to modify?

    For example if I wanted the Cell to increment by 1 for 4 cells, and then on the 5th cell increment by 4, then 6th cell increment by 1 for the next 4 cells.
    Last edited by JulianS96; 09-25-2020 at 04:43 AM.

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: How to increment a columns' cell reference by 1, then by 2, then by 1 etc.

    Please try at B2

    =INDEX(A2:A11,(ROWS(B$2:B2)+1)/2)
    Attached Files Attached Files

  5. #5
    Forum Contributor JulianS96's Avatar
    Join Date
    11-01-2019
    Location
    England
    MS-Off Ver
    365 (work-99%), 2016 (home-1%)
    Posts
    266

    Re: How to increment a columns' cell reference by 1, then by 2, then by 1 etc.

    Quote Originally Posted by Bo_Ry View Post
    Please try at B2

    =INDEX(A2:A11,(ROWS(B$2:B2)+1)/2)
    Thanks Bo_Ry. That formula works nicely as well.
    In reference to my above question, What numbers would I modify if I wanted to achieve a pattern of "Increment cell reference by 1 for 4 iterations, then by 4 for 1 iteration, then by 1 for 4 iterations etc."

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

    Re: How to increment a columns' cell reference by 1, then by 2, then by 1 etc.

    I am not sure 100% understanding, but following is scenarios of:
    Value is from A4 down
    Other column, i.e, from L4 down to take value in column A, with this frequency:
    1
    1
    1
    1
    4
    1
    1
    1
    1
    then repeat for next set of 9 rows.
    Attached Files Attached Files

  7. #7
    Forum Contributor JulianS96's Avatar
    Join Date
    11-01-2019
    Location
    England
    MS-Off Ver
    365 (work-99%), 2016 (home-1%)
    Posts
    266

    Re: How to increment a columns' cell reference by 1, then by 2, then by 1 etc.

    Hi bebo, I have made a new sheet to display what I mean. In the top you can see I have worked out how to keep the increment by 1 for however many cells by changing the divisor. The incremental of + 5 after that is what I am unsure of.
    I meant to Say increment of +5 before as it is a gap of 4 rows that I am hoping for.
    Last edited by JulianS96; 09-25-2020 at 05:32 AM.

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

    Re: How to increment a columns' cell reference by 1, then by 2, then by 1 etc.

    So, for each row, current row will move down:
    0
    0
    0
    0
    4
    4
    4
    4
    8
    8
    8
    8
    ...

    In J28:
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor JulianS96's Avatar
    Join Date
    11-01-2019
    Location
    England
    MS-Off Ver
    365 (work-99%), 2016 (home-1%)
    Posts
    266

    Re: How to increment a columns' cell reference by 1, then by 2, then by 1 etc.

    Yep that'll do it haha!
    What is the modification number for the modification of +5 in that formula?
    Nvm i worked it out!
    The divisor e.g. "/4" in this case is the number of repeats of "+1 cell ref" and the "*4" is the number of cell references to increase by after the number after the divisor has completed. Then repeat.
    Thanks bebo!
    Last edited by JulianS96; 09-25-2020 at 05:55 AM.

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

    Re: How to increment a columns' cell reference by 1, then by 2, then by 1 etc.

    row(1:1)-1 drag down to be 0,1,2,3 (integer no repeat)
    (row(1:1)-1)/4 to be 0/4,1/4,2/4,3/4, then, 4/4,5/4,6/4,7/4,then... with each group have the same rounded interger
    int(.../4) drag down to be 0,0,0,0,1,1,1,1,2,2,2,2 (each repeat 4 times)
    Then* 4 to become 0,0,0,0,4,4,4,4,8,8,8,8,...



    INT((ROW(1:1)-1)/4)*4

  11. #11
    Forum Contributor JulianS96's Avatar
    Join Date
    11-01-2019
    Location
    England
    MS-Off Ver
    365 (work-99%), 2016 (home-1%)
    Posts
    266

    Re: How to increment a columns' cell reference by 1, then by 2, then by 1 etc.

    Very detailed explanation thank you for that!

+ 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. Need to drag a cell reference down but increment columns
    By megadolphin in forum Excel General
    Replies: 13
    Last Post: 07-31-2019, 11:01 PM
  2. Increment cell reference after nth row.
    By sjs4952 in forum Excel General
    Replies: 2
    Last Post: 08-23-2018, 05:07 AM
  3. Cell reference increment other than 1
    By Nickolai in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-07-2014, 05:13 PM
  4. [SOLVED] Increment Cell Reference
    By XLVBA in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2012, 08:33 AM
  5. Increment Cell Reference
    By Perry in forum Excel General
    Replies: 4
    Last Post: 03-08-2006, 04:20 AM
  6. A2 cell reference increment
    By cejones in forum Excel General
    Replies: 3
    Last Post: 11-07-2005, 11:45 PM

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