The Gammainv function is the inverse of the Excel Gammadist function (when used to calculate the cumulative distribution function).
I.e. for a supplied probability, P, the Gammainv function returns the value of x such that:
In Excel 2010, the Gammainv function has been replaced by the Gamma.Inv function, which has improved accuracy.
Although it has been replaced, the Gammainv function is still available in Excel 2010 (stored in the list of compatibility functions), to allow compatibility with earlier versions of Excel.
The Excel Gammainv function returns the inverse of the Gamma Cumulative Distribution.
The syntax of the function is:
where the function arguments are:
probability    The probability value for which you want to evaluate the inverse Gamma Cumulative Distribution Function (must be between 0 & 1). 
alpha    A parameter of the distribution. 
beta    A parameter of the distribution. (Note: if beta=0, then this specifies the Standard Gamma Distribution). 
The charts below show the Gamma Cumulative Distribution and the Inverse Gamma Cumulative Distribution, with the parameter alpha set to 3 and the parameter beta set to 2.
Gamma Cumulative Distribution Function with α=3 & β=2  Inverse Gamma Cumulative Distribution with α=3 & β=2 
If you want to calculate the value of the Inverse Gamma Cumulative Distribution for the probability 0.5, this can be done using the Excel Gammainv function, as follows:
This gives the result 5.348120627.
Further examples of the Excel Gammainv function are provided on the Microsoft Office website.
If you get an error from the Excel Gammainv function this is likely to be one of the following:
#NUM!    Occurs if either:

#N/A    Occurs if Excel fails to converge to a solution after 100 iterations. Excel is unable to calculate the solution. 
#VALUE!    Occurs if any of the supplied arguments are nonnumeric. 