Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default sumproduct or sumif?


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

thanks
--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default 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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default 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.




  #6   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default 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.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default 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.


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
Need SUMIF / SUMPRODUCT help I think Big_Tater[_2_] Excel Discussion (Misc queries) 1 September 25th 09 12:54 AM
SumIF or SumProduct DS Excel Discussion (Misc queries) 2 September 22nd 09 08:12 PM
sumproduct and sumif Boris75 Excel Worksheet Functions 6 August 13th 08 04:24 PM
Sumif or Sumproduct? Helpless in Colorado Excel Discussion (Misc queries) 12 April 16th 08 01:55 PM
Sumif or Sumproduct Jim Excel Worksheet Functions 3 November 16th 05 09:32 PM


All times are GMT +1. The time now is 02:14 AM.

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

About Us

"It's about Microsoft Excel"