Home > Software engineering >  How to make a sequence in google sheets which has increments in regular intervals
How to make a sequence in google sheets which has increments in regular intervals

Time:07-18

I want to create a sequence in google sheets where i have to make a sequence of this sort like if the sequence starts at 5000, it should be 5000 for the next 12 rows and then it should increment to 5500 and then it should go on for another 12 rows to be 5500. So basically it should increment by 10% after 12 rows and continue to do this.

CodePudding user response:

Try

={sequence(12,1,5000,0);sequence(12,1,5000*1.1,0);sequence(12,1,5000*1.1*1.1,0)}

CodePudding user response:

I found this a bit tricky, maybe others have smoother answers. But one way is to use FV() function for a compound interest. With a combination of SEQUENCE() you can get the cumulative increase:

enter image description here

Formula in A1:

=INDEX(FLATTEN(SPLIT(REPT(FV(D3,SEQUENCE(D4),0,-(D1/(D3 1)))&"|",D2),"|",1)))

Or, without the FV() function, but with math and same concept:

=INDEX(FLATTEN(SPLIT(REPT(D1*(1 D3)^SEQUENCE(D4,1,0)&"|",D2),"|",1)))

Note: For reading purposes I set blocksize to 2 rows only.

CodePudding user response:

=ArrayFormula(vlookup(quotient(sequence(Blocklength*Blocks,1,0),Blocklength),
{sequence(Blocks,1,0),Start*(1 Increment)^(sequence(Blocks,1,0))},2))

enter image description here

  • Related