title: Repeat N1:Nx rows Y1:Yx times?
body: <p>I'm trying to create a Google sheet for an address label mail merge to direct people to their nearest outlet.</p>
  
  <p>For 105 people, it might be Store 2 at 300 Block St; for another 60, it might be Store 8 at 55 Front Ave. </p>
  
  <p>The goal is to have Google Sheets output a table with 105 rows of "Store 2; 300 Block Street", 60 rows of "Store 8; 55 Front Ave", etc.</p>
  
  <p>I've tried using </p>
  
  <pre><code>transpose(split(rept("&lt;cell with address&gt;"&amp;",", "&lt;number of rows&gt;"), ",")) 
  </code></pre>
  
  <p>but that's super laborious and error-prone to type out if I have 30 locations to repeat the process for. </p>
  
  <p>Any ideas?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I managed to solve the problem soon after posting this but have left it up to see if there was a better way. The key to getting it working was using JOIN. Here is what I ended up using:</p>
  
  <pre><code>=arrayformula(transpose(split(join(",",rept(F2:F&amp;",",H2:H)),",")))
  </code></pre>