Get the value of a cell in a merged range
<p>I'm iterating over a column in a sheet, which contains merged cells spread over a few rows. E.g.</p>

<pre><code>        |-----
 row 1  |  5
        |-----
 row 2  |
 row 3  |  3
 row 4  |
        |-----
 row 5  |
        |-----
 row 6  |  1
        |-----
</code></pre>

<p>I use merging here to show a single value shared by multiple cells.</p>

<p>The problem is that when I'm trying to collect the data and I'm using <code>Range.getValues()</code> only the first cell in the merged range has a non-empty value (in the example <code>['5','3','','','','','1']</code>), so I can't know which cells are actually empty and which ones belong to a merged range. </p>

<p>The only workaround I found <a href="https://code.google.com/p/google-apps-script-issues/issues/detail?id=618" rel="nofollow">here</a> was color everything and look at the color of the cells (but this is super ugly).</p>

<p>Any nice way so solve this problem?</p>