我需要实现get公式函数 我将以下内容放在Visual Basic编辑器中
Function getformula(r As Range) As String
Application.Volatile
If r.HasArray Then
getformula = "<-- " & " {" & r.FormulaLocal & "}"
Else
getformula = "<-- " & " " & r.FormulaLocal
End If
End Function
但它不起作用并且显示&#34; NAME&#34;错误
答案 0 :(得分:-1)
Function getformula(r As Range) As String
Application.Volatile
If r.HasArray Then
getformula = "<-- " & _
" {" & r.FormulaLocal & "}"
Else
getformula = "<-- " & _
" " & r.FormulaArray
End If
End Function