且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

评估数组公式

更新时间:2023-11-04 12:37:10

L42 所建议,只需使用Evaluate的字符串变体即可使其与数组公式配合使用.
例如,

As suggested by L42, you only have to use the string variant of Evaluate to get it to work with array formulas.
For instance, does

Sub dural()
  MsgBox Evaluate("SUM(A1:A10)")
  MsgBox Evaluate("=SUM(G5:G10-F5:F10)")
  MsgBox [=SUM(G5:G10-F5:F10)]
  MsgBox [Sum(G5:G10-F5:F10)]
End Sub

为您工作(在G5:G10F5:F10中具有适当的值)?
此处.

work for you (with appropriate values in G5:G10 and F5:F10)?
Some further information is here.