# GrapeCity.Documents.Excel.IFormatConditions.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_IFormatConditions_Add_" data-uid="GrapeCity.Documents.Excel.IFormatConditions.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_IFormatConditions_Add_" data-uid="GrapeCity.Documents.Excel.IFormatConditions.Add*"></a>
<h4 id="GrapeCity_Documents_Excel_IFormatConditions_Add_GrapeCity_Documents_Excel_FormatConditionType_GrapeCity_Documents_Excel_FormatConditionOperator_System_Object_System_Object_" data-uid="GrapeCity.Documents.Excel.IFormatConditions.Add(GrapeCity.Documents.Excel.FormatConditionType,GrapeCity.Documents.Excel.FormatConditionOperator,System.Object,System.Object)">Add(FormatConditionType, FormatConditionOperator, object, object)</h4>
<div class="markdown level1 summary"><p>Adds a new conditional format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">object Add(FormatConditionType type, FormatConditionOperator formatConditionOperator = FormatConditionOperator.Between, object formula1 = null, object formula2 = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Add(type As FormatConditionType, Optional formatConditionOperator As FormatConditionOperator = FormatConditionOperator.Between, Optional formula1 As Object = Nothing, Optional formula2 As Object = Nothing) As Object</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="GrapeCity.Documents.Excel.FormatConditionType.html">FormatConditionType</a></td>
      <td><span class="parametername">type</span></td>
      <td><p>Specifies the type for the new conditional format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.FormatConditionOperator.html">FormatConditionOperator</a></td>
      <td><span class="parametername">formatConditionOperator</span></td>
      <td><p>Specifies the operator of the conditional format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">formula1</span></td>
      <td><p>Specifies the first formula of the conditional format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">formula2</span></td>
      <td><p>Specifies the second formula of the conditional format.</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.object">object</a></td>
      <td><p>The new conditional format.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
