I've a google sheet formula which I am using to repeat values n number of times, formula is this:-
=ArrayFormula(LAMBDA(values,num_repeat,XLOOKUP(SEQUENCE(SUM(num_repeat)),VSTACK(1,SCAN(1,num_repeat,LAMBDA(init,repeat,init+repeat))),VSTACK(values,""),,-1))(A1:A,B1:B))
Here A1:A
contains Text values which I want to repeat number of times in range B1:B
, formula works absolutely fine, but it is very slow, I have large dataset on which I am applying this formula, can anyone help me to improve the formula getting the same result. I think sequence is causing issue, although I am not sure, or there any other alternative without making the formula too big.
Thanks