【发布时间】:2013-02-21 11:58:09
【问题描述】:
例如,我怎样才能找到更快的公式?
=SUMPRODUCT((Data!D:D="RC Corp")*(Data!AD:AD="Expected Allowances / Provisions"))
对比
=COUNTIFS(Data!D:D,"RC Corp",Data!AD:AD,"Expected Allowances / Provisions")
Vs 将 2 个字段连接到一个新列中并做
Z1 = D1&AD1
=Countif(Data!Z:Z,"RC CorpExpected Allowances / Provisions")
Vs VBA
Dim i as integer
Dim Total as integer
Total = 0
i=0
While i < 1000
IF Range("D"&i).Value = "RC Corp" AND Range("AD"&i).Value = "Expected Allowances / Provisions" Then
Total = Total + 1
End If
Wend
Range("$A$1").Value = Total
【问题讨论】:
标签: performance excel excel-formula processing-efficiency array-formulas