ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sum Product vs Sum(If) (https://www.excelbanter.com/excel-discussion-misc-queries/95113-sum-product-vs-sum-if.html)

anandmr65

Sum Product vs Sum(If)
 

Hi,

Can somebody tell me which of two is better & why.

Counting Based on Multiple Criteria
We can use =SUMPRODUCT((C2:C6<1000)*(B2:B6="red")) or we can also use
array formula with Sum(if((C2:C6<1000),if(B2:B6="red")),1,0) (syntax
might not be exact).

IS there any advantage of using Sumproduct over using Sum(if, or vice
versa.

Please educate, since I have been using the array formula version
(sum(if).

Thanks in advance.

Regards
Anand


--
anandmr65
------------------------------------------------------------------------
anandmr65's Profile: http://www.excelforum.com/member.php...o&userid=30728
View this thread: http://www.excelforum.com/showthread...hreadid=553920


Bob Phillips

Sum Product vs Sum(If)
 
I think the difference would be small if not negligible, as they both work
on arrays. I prefer SP, as it looks more intuitive to me when the formula is
written out.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"anandmr65" wrote
in message ...

Hi,

Can somebody tell me which of two is better & why.

Counting Based on Multiple Criteria
We can use =SUMPRODUCT((C2:C6<1000)*(B2:B6="red")) or we can also use
array formula with Sum(if((C2:C6<1000),if(B2:B6="red")),1,0) (syntax
might not be exact).

IS there any advantage of using Sumproduct over using Sum(if, or vice
versa.

Please educate, since I have been using the array formula version
(sum(if).

Thanks in advance.

Regards
Anand


--
anandmr65
------------------------------------------------------------------------
anandmr65's Profile:

http://www.excelforum.com/member.php...o&userid=30728
View this thread: http://www.excelforum.com/showthread...hreadid=553920




Don Guillett

Sum Product vs Sum(If)
 
I personally always use sumproduct if I can. Some say less resources and no
CSE

average(if
is a good array formula

--
Don Guillett
SalesAid Software

"anandmr65" wrote
in message ...

Hi,

Can somebody tell me which of two is better & why.

Counting Based on Multiple Criteria
We can use =SUMPRODUCT((C2:C6<1000)*(B2:B6="red")) or we can also use
array formula with Sum(if((C2:C6<1000),if(B2:B6="red")),1,0) (syntax
might not be exact).

IS there any advantage of using Sumproduct over using Sum(if, or vice
versa.

Please educate, since I have been using the array formula version
(sum(if).

Thanks in advance.

Regards
Anand


--
anandmr65
------------------------------------------------------------------------
anandmr65's Profile:
http://www.excelforum.com/member.php...o&userid=30728
View this thread: http://www.excelforum.com/showthread...hreadid=553920




Biff

Sum Product vs Sum(If)
 
Sum(if((C2:C6<1000),if(B2:B6="red")),1,0) (syntax might not be exact).

You've got some misplaced ( ).

That could be better expressed as:

=SUM((C2:C6<1000)*(B2:B6="red"))

I'm like Don, I only use array formulas when I have to but a lot depends on
the size and functionality of the particular file. And, as Bob pointed out,
the difference between the SUM(IF and the SUMPRODUCT is probably negligible.

Biff

"anandmr65" wrote
in message ...

Hi,

Can somebody tell me which of two is better & why.

Counting Based on Multiple Criteria
We can use =SUMPRODUCT((C2:C6<1000)*(B2:B6="red")) or we can also use
array formula with Sum(if((C2:C6<1000),if(B2:B6="red")),1,0) (syntax
might not be exact).

IS there any advantage of using Sumproduct over using Sum(if, or vice
versa.

Please educate, since I have been using the array formula version
(sum(if).

Thanks in advance.

Regards
Anand


--
anandmr65
------------------------------------------------------------------------
anandmr65's Profile:
http://www.excelforum.com/member.php...o&userid=30728
View this thread: http://www.excelforum.com/showthread...hreadid=553920





All times are GMT +1. The time now is 04:48 AM.

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