# GrapeCity.Spreadsheet.IFormatCondition.Modify

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_IFormatCondition_Modify_" data-uid="GrapeCity.Spreadsheet.IFormatCondition.Modify*">Modify Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_IFormatCondition_Modify_" data-uid="GrapeCity.Spreadsheet.IFormatCondition.Modify*"></a>
<h4 id="GrapeCity_Spreadsheet_IFormatCondition_Modify_GrapeCity_Spreadsheet_FormatConditionType_GrapeCity_Spreadsheet_FormatConditionOperator_System_String_System_String_GrapeCity_Spreadsheet_ContainsOperator_GrapeCity_Spreadsheet_TimePeriods_" data-uid="GrapeCity.Spreadsheet.IFormatCondition.Modify(GrapeCity.Spreadsheet.FormatConditionType,GrapeCity.Spreadsheet.FormatConditionOperator,System.String,System.String,GrapeCity.Spreadsheet.ContainsOperator,GrapeCity.Spreadsheet.TimePeriods)">Modify(FormatConditionType, FormatConditionOperator, string, string, ContainsOperator, TimePeriods)</h4>
<div class="markdown level1 summary"><p>Modifies an existing conditional format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">bool Modify(FormatConditionType type, FormatConditionOperator @operator = FormatConditionOperator.Equal, string formula1 = null, string formula2 = null, ContainsOperator textOperator = ContainsOperator.Contains, TimePeriods dateOperator = TimePeriods.Today)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Modify(type As FormatConditionType, Optional [operator] As FormatConditionOperator = FormatConditionOperator.Equal, Optional formula1 As String = Nothing, Optional formula2 As String = Nothing, Optional textOperator As ContainsOperator = ContainsOperator.Contains, Optional dateOperator As TimePeriods = TimePeriods.Today) 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="GrapeCity.Spreadsheet.FormatConditionType.html">FormatConditionType</a></td>
      <td><span class="parametername">type</span></td>
      <td><p>Specifies whether the conditional format is based on a cell value or an expression.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.FormatConditionOperator.html">FormatConditionOperator</a></td>
      <td><span class="parametername">operator</span></td>
      <td><p>The conditional format operator. If <code class="paramref">type</code> is <a class="xref" href="GrapeCity.Spreadsheet.FormatConditionType.html#GrapeCity_Spreadsheet_FormatConditionType_TextString">TextString</a> or <a class="xref" href="GrapeCity.Spreadsheet.FormatConditionType.html#GrapeCity_Spreadsheet_FormatConditionType_Expression">Expression</a>, it'll be ignored.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">formula1</span></td>
      <td><p>The value or expression associated with the conditional format. Can be a constant value, a string value, a cell reference, or a formula.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">formula2</span></td>
      <td><p>The value or expression associated with the second part of the conditional format when Operator is xlBetween or xlNotBetween (otherwise, this argument is ignored). Can be a constant value, a string value, a cell reference, or a formula.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.ContainsOperator.html">ContainsOperator</a></td>
      <td><span class="parametername">textOperator</span></td>
      <td><p>The conditional format text operator. If <code class="paramref">type</code> isn't <a class="xref" href="GrapeCity.Spreadsheet.FormatConditionType.html#GrapeCity_Spreadsheet_FormatConditionType_TextString">TextString</a>, it'll be ignored.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.TimePeriods.html">TimePeriods</a></td>
      <td><span class="parametername">dateOperator</span></td>
      <td><p>The date operator used in the format condition.</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 conditional format is modified, <code>false</code> otherwise.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Spreadsheet_IFormatCondition_Modify_GrapeCity_Spreadsheet_FormatConditionType_GrapeCity_Spreadsheet_FormatConditionOperator_System_String_System_String_GrapeCity_Spreadsheet_ContainsOperator_GrapeCity_Spreadsheet_TimePeriods__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the <code class="paramref">type</code> is <a class="xref" href="GrapeCity.Spreadsheet.FormatConditionType.html#GrapeCity_Spreadsheet_FormatConditionType_Databar">Databar</a> or <a class="xref" href="GrapeCity.Spreadsheet.FormatConditionType.html#GrapeCity_Spreadsheet_FormatConditionType_IconSet">IconSet</a> or <a class="xref" href="GrapeCity.Spreadsheet.FormatConditionType.html#GrapeCity_Spreadsheet_FormatConditionType_ColorScale">ColorScale</a>, the current conditional format will be replaced by a new conditional format.</p>
</div>


<a id="GrapeCity_Spreadsheet_IFormatCondition_Modify_" data-uid="GrapeCity.Spreadsheet.IFormatCondition.Modify*"></a>
<h4 id="GrapeCity_Spreadsheet_IFormatCondition_Modify_GrapeCity_Spreadsheet_ContainsOperator_System_String_" data-uid="GrapeCity.Spreadsheet.IFormatCondition.Modify(GrapeCity.Spreadsheet.ContainsOperator,System.String)">Modify(ContainsOperator, string)</h4>
<div class="markdown level1 summary"><p>Modifies an existing conditional format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">bool Modify(ContainsOperator @operator, string text)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Modify([operator] As ContainsOperator, text As String) 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="GrapeCity.Spreadsheet.ContainsOperator.html">ContainsOperator</a></td>
      <td><span class="parametername">operator</span></td>
      <td><p>The conditional format text operator.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>The text associated with 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.boolean">bool</a></td>
      <td><p><code>true</code> if the conditional format is modified, <code>false</code> otherwise.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Spreadsheet_IFormatCondition_Modify_" data-uid="GrapeCity.Spreadsheet.IFormatCondition.Modify*"></a>
<h4 id="GrapeCity_Spreadsheet_IFormatCondition_Modify_GrapeCity_Spreadsheet_TimePeriods_" data-uid="GrapeCity.Spreadsheet.IFormatCondition.Modify(GrapeCity.Spreadsheet.TimePeriods)">Modify(TimePeriods)</h4>
<div class="markdown level1 summary"><p>Modifies an existing conditional format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">bool Modify(TimePeriods dateOperator)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Modify(dateOperator As TimePeriods) 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="GrapeCity.Spreadsheet.TimePeriods.html">TimePeriods</a></td>
      <td><span class="parametername">dateOperator</span></td>
      <td><p>The date operator used in the format condition.</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 conditional format is modified, <code>false</code> otherwise.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
