# FarPoint.Web.Spread.FpSpread.GoalSeek

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Web_Spread_FpSpread_GoalSeek_" data-uid="FarPoint.Web.Spread.FpSpread.GoalSeek*">GoalSeek Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Web_Spread_FpSpread_GoalSeek_" data-uid="FarPoint.Web.Spread.FpSpread.GoalSeek*"></a>
<h4 id="FarPoint_Web_Spread_FpSpread_GoalSeek_System_Int32_System_Int32_System_Int32_System_Int32_System_Int32_System_Int32_System_Double_" data-uid="FarPoint.Web.Spread.FpSpread.GoalSeek(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Double)">GoalSeek(int, int, int, int, int, int, double)</h4>
<div class="markdown level1 summary"><p>Attempts to find values for one cell that will produce the desired formula result
in another cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool GoalSeek(int variableSheet, int variableRow, int variableColumn, int formulaSheet, int formulaRow, int formulaColumn, double desiredResult)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GoalSeek(variableSheet As Integer, variableRow As Integer, variableColumn As Integer, formulaSheet As Integer, formulaRow As Integer, formulaColumn As Integer, desiredResult As Double) 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.int32">int</a></td>
      <td><span class="parametername">variableSheet</span></td>
      <td><p>Sheet index of cell that contains value to adjust</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">variableRow</span></td>
      <td><p>Row index of cell that contains value to adjust</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">variableColumn</span></td>
      <td><p>Column index of cell that contains value to adjust</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">formulaSheet</span></td>
      <td><p>Sheet index of cell that contains formula</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">formulaRow</span></td>
      <td><p>Row index of cell that contains formula</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">formulaColumn</span></td>
      <td><p>Column index of cell that contains formula</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">desiredResult</span></td>
      <td><p>Formula result you wish to achieve</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>true if value is found, false otherwise</p>
</td>
    </tr>
  </tbody>
</table>
</div>
