Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
anandmr65
 
Posts: n/a
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formulations? rlphelp Excel Discussion (Misc queries) 3 November 10th 05 04:40 PM
Percentages Darryl Charts and Charting in Excel 2 May 21st 05 04:31 PM
How to set a formula to count the product appear how manytime AMY Excel Worksheet Functions 3 March 21st 05 09:49 AM
SUMIF Not vanjohnson Excel Discussion (Misc queries) 1 March 4th 05 08:42 PM
Which function(s)? LB Excel Worksheet Functions 3 January 5th 05 06:19 PM


All times are GMT +1. The time now is 10:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"