ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sumproduct or sumif? (https://www.excelbanter.com/excel-programming/382631-sumproduct-sumif.html)

Gary Keramidas

sumproduct or sumif?
 

is one preferable to the other, since i can use either and get the same result?

thanks
--


Gary




Dave Peterson

sumproduct or sumif?
 
If I could use either, I would use =sumif(). (If I remember!)

I think if you put a bunch of these into a test workbook, you'd see that the
=sumif() test workbook would calculate faster.

Gary Keramidas wrote:

is one preferable to the other, since i can use either and get the same result?

thanks
--

Gary


--

Dave Peterson

Bob Phillips

sumproduct or sumif?
 
SUMIF is preferable, it is more efficient not working on arrays as SP does.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...

is one preferable to the other, since i can use either and get the same
result?

thanks
--


Gary






Gary Keramidas

sumproduct or sumif?
 
ok, thanks dave and bob

--


Gary


"Bob Phillips" wrote in message
...
SUMIF is preferable, it is more efficient not working on arrays as SP does.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...

is one preferable to the other, since i can use either and get the same
result?

thanks
--


Gary








IanKR

sumproduct or sumif?
 
is one preferable to the other, since i can use either and get the
same result?
thanks


Sumif can test for only one condition, but Sumproduct can test multiple
conditions [ see http://www.xldynamic.com/source/xld.SUMPRODUCT.html ]. So
if you're testing only one condition, use Sumif.



JMB

sumproduct or sumif?
 
Although, it is worth mentioning, multiple sumifs could be used to test for
multiple conditions (in some cases) - such as summing data between two date
ranges (where the data is in A1:B10, C6 is the start date and C7 is the end
date in the formula below). My experience has been that this scenario is
still faster than a single sumproduct formula.

=SUMIF(A1:A10,"="&C6,B1:B10)-SUMIF(A1:A10,""&C7,B1:B10)


"IanKR" wrote:

is one preferable to the other, since i can use either and get the
same result?
thanks


Sumif can test for only one condition, but Sumproduct can test multiple
conditions [ see http://www.xldynamic.com/source/xld.SUMPRODUCT.html ]. So
if you're testing only one condition, use Sumif.




IanKR

sumproduct or sumif?
 
is one preferable to the other, since i can use either and get the
same result?
thanks


Sumif can test for only one condition, but Sumproduct can test
multiple conditions [ see
http://www.xldynamic.com/source/xld.SUMPRODUCT.html ]. So if you're
testing only one condition, use Sumif.


Although, it is worth mentioning, multiple sumifs could be used to
test for multiple conditions (in some cases) - such as summing data
between two date ranges (where the data is in A1:B10, C6 is the start
date and C7 is the end date in the formula below). My experience has
been that this scenario is still faster than a single sumproduct
formula.

=SUMIF(A1:A10,"="&C6,B1:B10)-SUMIF(A1:A10,""&C7,B1:B10)



Thanks - that's a good technique I haven't seen before.




All times are GMT +1. The time now is 10:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com