Screwiest thing I ever saw. None of these changes made a difference, but I could get it to fail every time by adding more calls to the function (More formulas on the sheet.)

BTW, wasn't the original showing two values as the result? ICR. With Result and Result2, it shows a range address and a value.

[VBA]Function SF(r As Range, Z As Integer) As String
'Previously called gfrv()
'Posted origionally by Harlan Grove(HrlnGrv@aol.com) on microsoft.public.excel.questions 2002-02-27
'Modified , 09/22/05 : now user does not need to refresh equation for function to work
'Modified , 09/22/05 : now has ability to specify number of decimal places to display.

Const crep As String = "(([A-Za-z0-9_]+|'[^']+')!)?\$?[A-Z]{1,2}\$?[0-9]+"
Const mrep As String = "(([A-Za-z0-9_]+:[A-Za-z0-9_]+|'[^']+:[^']+')\!)|(\$?[A-Z]{1,2}\$?[0-9]+:\$?[A-Z]{1,2}\$?[0-9]+)"

Dim v As Variant, n As Long
Dim regex As Object, matches As Object, m As Object
Dim Result As String
Dim Result2 As String

' Application.Calculation = xlCalculationSemiautomatic
'Application.Calculation = xlCalculationManual
Result = Mid(r.Formula, 2)

Set regex = CreateObject("vbscript.regexp")
regex.Global = True

regex.Pattern = mrep
Set matches = regex.Execute(Result)
If matches.Count > 0 Then Exit Function

regex.Pattern = crep
Set matches = regex.Execute(Result)
n = matches.Count - 1

For n = n To 0 Step -1
Set m = matches.Item(n)
v = Evaluate(m.Value)
If IsNumeric(Val(v)) = True Then
v = Application.WorksheetFunction.Round(v, Z)
End If
Result2 = Left(Result, m.FirstIndex) & CStr(v) & _
Mid(Result, m.FirstIndex + m.Length + 1)

Next n
'Application.Calculate
'Application.Calculation = xlCalculationAutomatic
SF = Result2
End Function

[/VBA]