Search code examples
exceljoinexcel-formulaoffice365repeater

is there a one cell formula for getting a comma separated list with increasing numbers in EXCEL


Look at the picture below: I have 3 cells containing the starting number(B4=1), the increment number (C4=2) and the desired amount of numbers in the list (D4=3). In F4 I would like to have a list of comma separated values in F4 (1,3,5). I tried something with REPT : B4&REPT(","&1(something like+C4);D4-1), but I do not know how to increase each repetion value.

;


Solution

  • Consider:

    =TEXTJOIN(",",TRUE,SEQUENCE(C1,,A1,B1))
    

    with the starting value in A1, the increment in B1 and the number of items in C1.

    enter image description here