title: Alternative for gammainv() Excel function?
body: <p>I believe I'm encountering a problem with the gammainv function of Excel 2007. For some combinations of input parameters it returns the #NUM! error. </p>
  
  <p>The gammainv function returns the inverse of the gamma cumulative distribution. </p>
  
  <pre><code>Syntax --&gt; gammainv(probability,alpha,beta)
  </code></pre>
  
  <p>For example:</p>
  
  <pre><code>=gammainv(0.83,0.0977,25.849) '&lt;-- gives this problem.
  </code></pre>
  
  <p>With the same alpha and beta, the problem arises also with probability= 0.84 and probability = 0.85 but not with all other 0.01 increment values between 0 and 1. This is an example, the problem also arises for other combinations of probability, alpha and beta. This example does work without problems when using matlab's <code>gaminv</code> function.</p>
  
  <p>I believe the problem is related to this problem: <a href="http://support.microsoft.com/kb/215214" rel="nofollow">http://support.microsoft.com/kb/215214</a></p>
  
  <p>My question if there is a solution to this problem. I'm interested in:</p>
  
  <ul>
  <li>Some fix for this function in Excel 2007</li>
  <li>A VBA function that does the same, but without the problem.</li>
  <li>Any other lead to narrowing down the problem.</li>
  <li>Any workaround that will help me evaluate instances as the presented example.</li>
  </ul>