Thread: Array Formula
View Single Post
  #3   Report Post  
Frank Kabel
 
Posts: n/a
Default

[....]
First off, why not use SUMPRODUCT to avoid having to enter the formula
as an array formula. Many have confirmed that SUMPRODUCT calculates
such conditional sums faster than array-entered SUM, so the only
drawback to SUMPRODUCT is a little more typing for the function name.


Hi Harlan
I did some testing a couple of weeks ago and quite interestingly in my tests
I found the following:
I. Formulas used:
1.
=SUMPRODUCT(--('Data'!A1:A10000="A"),--('Data'!B1:B10000="X"),'Data'!C1:C10000)
2. =SUM(IF(('Data'!A1:A10000="A")*('Data'!B1:B10000=" X"),'Data'!C1:C10000))
3.
=SUM(IF('Data'!A1:A10000="A",IF('Data'!B1:B10000=" X",'Data'!C1:C10000,0)))

And the 'Data' sheet consisted of random entries I got the following
results:
- Slowest formula: Formula 3
- Second best: Formula 2 (5% faster)
- Fastest formula: Formula 3 (9% faster than formula 3)

Repeated this tests many times (10000 alculations each) and the above are
the averaged results.
BTW the '--' syntax seems to be really the fastest for SUMPRODUCT formulas
(closely followed by using N(..))


Frank