arraysgoogle-sheetsgoogle-sheets-formulasequencetranspose

How to generate a repeating sequence of numbers in Google Sheet?


What I need is quite simple, yet somehow I can't get around to find a solution for it.

Basically what I need is for a column, starting from its second row to look list numbers from 1 to 15 and have that sequence repeated all the way to the bottom of the sheet automatically. I was thinking about using arrayformula but couldn't figure out the formula for it.

enter image description here

Essentially something like this but it goes all the way down automatically.


Solution

  • Explanation:

    You can repeat (REPT) a sequence of numbers from 1 to 15 by using the Sequence formula.

    The maximum number of times you want to repeat this sequence will be determined by the total number of rows in your sheet divided by 15.

    Solution:

    =transpose(split(REPT(concat(JOIN(",",SEQUENCE(1,15)),","),ROUNDDOWN(ROWS(A1:A)/15)),",",true))
    

    Output:

    output