Home > database >  Google Sheets: Formula that returns same number of rows based on cell values
Google Sheets: Formula that returns same number of rows based on cell values

Time:11-30

I have a list of users and a value that denotes how many times I want to return the user's name.

enter image description here

How do I set up a formula that helps me output this?

enter image description here

CodePudding user response:

try:

=INDEX(QUERY(FLATTEN(IFERROR(SPLIT(REPT(A2:A&"×"; B2:B); "×"))); 
 "where Col1 is not null"; ))
  • Related