# GrapeCity.Documents.Excel.IScenario.ChangeScenario

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_IScenario_ChangeScenario_" data-uid="GrapeCity.Documents.Excel.IScenario.ChangeScenario*">ChangeScenario Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_IScenario_ChangeScenario_" data-uid="GrapeCity.Documents.Excel.IScenario.ChangeScenario*"></a>
<h4 id="GrapeCity_Documents_Excel_IScenario_ChangeScenario_GrapeCity_Documents_Excel_IRange_System_Collections_Generic_List_System_Object__" data-uid="GrapeCity.Documents.Excel.IScenario.ChangeScenario(GrapeCity.Documents.Excel.IRange,System.Collections.Generic.List{System.Object})">ChangeScenario(IRange, List&lt;object&gt;)</h4>
<div class="markdown level1 summary"><p>Changes the scenario to have a new set of changing cells and (optionally) scenario values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void ChangeScenario(IRange changingCells, List&lt;object&gt; values = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub ChangeScenario(changingCells As IRange, Optional values As List(Of Object) = Nothing)</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.IRange.html">IRange</a></td>
      <td><span class="parametername">changingCells</span></td>
      <td><p>A Range object that refers to the changing cells for the scenario.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</td>
      <td><span class="parametername">values</span></td>
      <td><p>A list that contains the scenario values for the cells in ChangingCells. If this argument is omitted, the scenario values are assumed to be the current values in the cells in ChangingCells.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
