# GrapeCity.Spreadsheet.IRange.Merge

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_IRange_Merge_" data-uid="GrapeCity.Spreadsheet.IRange.Merge*">Merge Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_IRange_Merge_" data-uid="GrapeCity.Spreadsheet.IRange.Merge*"></a>
<h4 id="GrapeCity_Spreadsheet_IRange_Merge_System_Boolean_System_Boolean_System_Boolean_" data-uid="GrapeCity.Spreadsheet.IRange.Merge(System.Boolean,System.Boolean,System.Boolean)">Merge(bool, bool, bool)</h4>
<div class="markdown level1 summary"><p>Creates a merged cell from the specified <a class="xref" href="GrapeCity.Spreadsheet.IRange.html">IRange</a> object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">bool Merge(bool across = false, bool vertical = true, bool replace = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Merge(Optional across As Boolean = False, Optional vertical As Boolean = True, Optional replace As Boolean = False) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">across</span></td>
      <td><p>if set to <code>true</code>, merge cells in each row (or column) of the specified range as separate merged cells.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">vertical</span></td>
      <td><p>if set to <code>true</code>, cells are merged by rows; otherwise, cells are merged by columns. It has effect only if <code class="paramref">across</code> is <code>true</code>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">replace</span></td>
      <td><p>if set to <code>true</code>, intersected merged cells will be removed; otherwise, they'll be merged.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p><code>true</code> if the cell range is merged; otherwise, <code>false</code>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
