Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Which is Better / More Functional / Accurate

I was wondering if I can get an opinion on which is better; SUMIF OR
SUMPRODUCT. I suspect the answer will be SuMPRODUCT, however there are so
many ways of using this function that I can't get a grasp of how to use it in
what situation. So IF the resounding answer is indeed SUMPRODUCT - Can
someone point me to a place/resource where I can finally fully learn and
understand that function? Please?

Here are two examples of the same exact result that got me to wonder about
this...

SUMIF:
=IF(SUMIF(Sheet3!$B$3:$B$803,Sheet1!$C19,Sheet3!$F $3:$F$803)0,SUMIF(Sheet3!$B$3:$B$803,Sheet1!$C19, Sheet3!$F$3:$F$803),"-")

SUMPRODUCT:
=IF(SUMPRODUCT(--(Sheet3!$B$3:$B$803=Sheet1!$C19),Sheet3!$F$3:$F$80 3)=0,"-",SUMPRODUCT(--(Sheet3!$B$3:$B$803=Sheet1!$C19),Sheet3!$F$3:$F$80 3))


Thank You Very Much in Advance!
Rob
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Which is Better / More Functional / Accurate

In your case, I'd use SUMIF. It tends to be faster as XL doesn't have to
store as many array values, and it involves fewer calculation steps.

The advantage of SUMPRODUCT is that you could have more than one criteria
being checked (say, add up all values that correspond to "A" or "B").

Link to a longer explanation regarding the different methods/speeds.
http://www.ozgrid.com/Excel/sum-if.htm
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Rob" wrote:

I was wondering if I can get an opinion on which is better; SUMIF OR
SUMPRODUCT. I suspect the answer will be SuMPRODUCT, however there are so
many ways of using this function that I can't get a grasp of how to use it in
what situation. So IF the resounding answer is indeed SUMPRODUCT - Can
someone point me to a place/resource where I can finally fully learn and
understand that function? Please?

Here are two examples of the same exact result that got me to wonder about
this...

SUMIF:
=IF(SUMIF(Sheet3!$B$3:$B$803,Sheet1!$C19,Sheet3!$F $3:$F$803)0,SUMIF(Sheet3!$B$3:$B$803,Sheet1!$C19, Sheet3!$F$3:$F$803),"-")

SUMPRODUCT:
=IF(SUMPRODUCT(--(Sheet3!$B$3:$B$803=Sheet1!$C19),Sheet3!$F$3:$F$80 3)=0,"-",SUMPRODUCT(--(Sheet3!$B$3:$B$803=Sheet1!$C19),Sheet3!$F$3:$F$80 3))


Thank You Very Much in Advance!
Rob

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Which is Better / More Functional / Accurate

As a general rule, when you're dealing with a single condition use
SUMIF/COUNTIF. When you're dealing with more than one condition use
SUMPRODUCT.

However, there are times when you can use SUMIF/COUNTIF for multiple
conditions.

See this for more info on SUMPRODUCT:

http://xldynamic.com/source/xld.SUMPRODUCT.html

Also of note, if you're using Excel 2007 it comes with 2 new functions that
are a combination of SUMPRODUCT and SUMIF/COUNTIF. Those new functions are
called SUMIFS and COUNTIFS. They give you the efficiency of SUMIF/COUNTIF
combined with *some* of the functionality of SUMPRODUCT all rolled into a
single function.


--
Biff
Microsoft Excel MVP


"Rob" wrote in message
...
I was wondering if I can get an opinion on which is better; SUMIF OR
SUMPRODUCT. I suspect the answer will be SuMPRODUCT, however there are so
many ways of using this function that I can't get a grasp of how to use it
in
what situation. So IF the resounding answer is indeed SUMPRODUCT - Can
someone point me to a place/resource where I can finally fully learn and
understand that function? Please?

Here are two examples of the same exact result that got me to wonder about
this...

SUMIF:
=IF(SUMIF(Sheet3!$B$3:$B$803,Sheet1!$C19,Sheet3!$F $3:$F$803)0,SUMIF(Sheet3!$B$3:$B$803,Sheet1!$C19, Sheet3!$F$3:$F$803),"-")

SUMPRODUCT:
=IF(SUMPRODUCT(--(Sheet3!$B$3:$B$803=Sheet1!$C19),Sheet3!$F$3:$F$80 3)=0,"-",SUMPRODUCT(--(Sheet3!$B$3:$B$803=Sheet1!$C19),Sheet3!$F$3:$F$80 3))


Thank You Very Much in Advance!
Rob



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
DropdownText green, and non-functional Carl New Users to Excel 1 July 27th 08 11:17 PM
How to simplify a L O N G functional argument Gene Excel Worksheet Functions 7 July 16th 08 11:50 PM
Using + and / as characters not as functional formatting Bonnie Excel Discussion (Misc queries) 9 August 31st 07 03:58 PM
Excel 2007 Nearly Non Functional Desert Doug Excel Discussion (Misc queries) 10 June 10th 07 05:39 AM
Fully functional spreadsheets on web? famdamly Excel Discussion (Misc queries) 4 April 18th 06 10:21 AM


All times are GMT +1. The time now is 08:36 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"