Home > database >  Google Sheets - Repeat Each Value N Times with different N value
Google Sheets - Repeat Each Value N Times with different N value

Time:06-11

I am trying to repeat the words for N times but different N value for each items. For example in this picture is the desired output:

enter image description here

My current formula for this but I don't know how to make the N value into unique

=ARRAYFORMULA(FLATTEN(IF(SEQUENCE(1,C3),B3:B1000)))

CodePudding user response:

Try below formula-

=QUERY(ArrayFormula(FLATTEN(SPLIT(REPT(A1:A3&"@",B1:B3),"@"))),"where Col1 is not null")

enter image description here

  • Related