title: Returning a Range with some rows having merged columns in Google Appscript
body: <p>I am to create a custom function for Google Sheets using Google AppScript. I have a set of data that my custom function will summarize and display the summary on another sheet.</p>
  
  <p>I am able to create my on algorithm for the summary and return a range like this:</p>
  
  <p><strong>Current</strong></p>
  
  <p><a href="https://i.stack.imgur.com/OpM3G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OpM3G.png" alt="enter image description here"></a></p>
  
  <p>Now I understand that an Appscript function returns a two dimensional array, but my problem is how do I merge some of the cells Using Appscript? Whenever there's a month? Like this:</p>
  
  <p><strong>Target</strong></p>
  
  <p><a href="https://i.stack.imgur.com/fUwnZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fUwnZ.png" alt="enter image description here"></a></p>
  
  <p>For the example above,
  the range I will be returning from my custom function will be</p>
  
  <pre><code>[
      ['January', ''],
      ['Project 1', '10 Hours'],
      ['Project 2', '20 Hours'],
      ['Project 3', '30 Hours'],
      ['Project 4', '40 Hours'],
      ['Project 5', '50 Hours'],
      ['February', ''],
      ['Project 1', '10 Hours'],
      ['Project 2', '20 Hours'],
      ['Project 3', '30 Hours'],
      ['Project 4', '40 Hours'],
      ['Project 5', '50 Hours']
  ]
  </code></pre>
  
  <p>So how do I tell AppScript to tell GooglSheets that <code>['January', ''],</code> and <code>['February', ''],</code> are cells to be merged?</p>
  
  <p>If there's a function in Excel that can do this, I am also open to other methods. :)</p>
  
  <p>Thanks</p>