M
mohavv
Hi,
the following macro stpped working after upgrade to Office 2007.
I used it to get the actual formula as text.
Help is much appreciated.
Cheers,
Harold
Function GetFormula(Rng As Range)
Dim myFormula As String
GetFormula = ""
With Rng.Cells(1)
If .HasFormula Then
If Application.ReferenceStyle = xlA1 Then
myFormula = .Formula
Else
myFormula = .FormulaR1C1
End If
If .HasArray Then
GetFormula = "{=" & Mid(myFormula, 2, Len(myFormula))
& "}"
Else
GetFormula = myFormula
End If
End If
End With
End Function
the following macro stpped working after upgrade to Office 2007.
I used it to get the actual formula as text.
Help is much appreciated.
Cheers,
Harold
Function GetFormula(Rng As Range)
Dim myFormula As String
GetFormula = ""
With Rng.Cells(1)
If .HasFormula Then
If Application.ReferenceStyle = xlA1 Then
myFormula = .Formula
Else
myFormula = .FormulaR1C1
End If
If .HasArray Then
GetFormula = "{=" & Mid(myFormula, 2, Len(myFormula))
& "}"
Else
GetFormula = myFormula
End If
End If
End With
End Function