SUMIFS V's SUMPRODUCT - Calc Time

shemayisroel

Well-known Member
Joined
Sep 11, 2008
Messages
1,867
Hi,


I'm working on a bit of a beast and need to be as calculative effecient as possible.

Part o fthe solution would be to do certain counts and sum's based on multiple criteria - something that could easily be handled by SUMIFS or SUMPRODUCT.

My question is, in terms of calculation speed/effeciency which would generally be the better of the 2. Happy to also take on personal experience/feedback.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi,


I'm working on a bit of a beast and need to be as calculative effecient as possible.

Part o fthe solution would be to do certain counts and sum's based on multiple criteria - something that could easily be handled by SUMIFS or SUMPRODUCT.

My question is, in terms of calculation speed/effeciency which would generally be the better of the 2. Happy to also take on personal experience/feedback.
In Excel 2007/2010 the new SUMIFS/COUNTIFS functions are more efficient than the equivalent SUMPRODUCT formulas.

As a quick test I used up to 1000 rows of data and did a 2 condition sum.

These were the formulas tested:

=SUMIFS(C1:Cn,A1:An,">=50",B1:Bn,">=50")
=SUMPRODUCT(--(A1:An>=50),--(B1:Bn>=50),C1:Cn)

These are the results of the tests. I did 5 calculations on each formula for each different range size. The results are the average calculation times in seconds for 5 calculations.

Book1
ABC
1# of rowsSUMIFSSUMPRODUCT
21000.0015280.001686
35000.0017820.002484
410000.0020520.003514
Sheet1

The results will vary by machine but they can be used to clearly demonstrate the relative difference in efficiency between the tested formulas.

You can do your own testing. There is calculation timer code here:

http://msdn2.microsoft.com/en-us/library/aa730921.aspx

There is also the commercial product FastExcel which can be found here:

http://www.decisionmodels.com/
 
Upvote 0
We went through a recent similar exercise for a large summation process and the SUMIFS were 5 times faster (using FastExcel)

BUT SUMPRODUCT does work on a closed workbook whereas SUMIFS doesn't - something that may be relevant to your choice

Cheers

Dave
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top