比如我怎麼能找到什麼公式爲快?如何衡量Excel的計算時間
=SUMPRODUCT((Data!D:D="RC Corp")*(Data!AD:AD="Expected Allowances/Provisions"))
Vs的
=COUNTIFS(Data!D:D,"RC Corp",Data!AD:AD,"Expected Allowances/Provisions")
Vs的Concatinating的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
我會做以下操作:使用說明(這裏)的方法(http://www.codematic.net/excel-development/excel-vba/excel-vba-performance.htm)和[這裏](HTTP: //msdn.microsoft.com/en-us/library/office/ff700514(v=office.14).aspx)來加速性能。由定時重複循環關閉自動重計算的,書寫的字符串(或其它恆定到細胞中,並重新打開重計算設定的基準;做同樣爲您的公式,即,關閉重計算,寫式:爲了測試式性能細胞,並recalc'ing細胞或片。沒有嘗試這樣做自己,所以把這個作爲評論。 – chuff 2013-03-06 16:31:24