Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Google Sheets – Repeat Each Value N Times with different N value

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)))

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Try below formula-

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

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading