From pgc01's answer:
Function MyRATE(nper As Integer, pmt As Double, pv As Double, Optional fv As Double = 0, _
Optional PaymentEnd As Integer = 0, Optional guess As Double = 0.1)
Dim a As Double, b As Double, c As Double ' coefficients of the equation
Dim R As Double, RTmp As Double, i As Integer
' Initialize coefficients and R
R = 1 + guess
a = (pmt * (1 - PaymentEnd) - pv) / (pv + pmt * PaymentEnd)
b = (fv - pmt * PaymentEnd) / (pv + pmt * PaymentEnd)
c = (-pmt * (1 - PaymentEnd) - fv) / (pv + pmt * PaymentEnd)
' Iterate
For i = 1 To 20
RTmp = R - (R ^ (nper + 1) + a * R ^ nper + b * R + c) / ((nper + 1) * R ^ nper + a * nper * R ^ (nper - 1) + b)
If Abs(RTmp - R) < 0.0000001 Then Exit For
R = RTmp
Next i
If i <= 20 Then
MyRATE = RTmp - 1
Else
MyRATE = "N/A" ' Must try another guess
End If
End Function

Note:
This is not my code. I have not tested it over a full range of inputs.
EDIT#1:
This is a User Defined Function. User Defined Functions (UDFs) are very easy to install and use:
- ALT-F11 brings up the VBE window
- ALT-I
ALT-M opens a fresh module
- paste the stuff in and close the VBE window
If you save the workbook, the UDF will be saved with it.
If you are using a version of Excel later then 2003, you must save
the file as .xlsm rather than .xlsx
To remove the UDF:
- bring up the VBE window as above
- clear the code out
- close the VBE window
To use the UDF from Excel worksheet cell:
=myrate(B5,B4,-B3,0,B6)*12
To learn more about macros in general, see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
and
http://msdn.microsoft.com/en-us/library/ee814735(v=office.14).aspx
and for specifics on UDFs, see:
http://www.cpearson.com/excel/WritingFunctionsInVBA.aspx
Macros must be enabled for this to work!