Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 43
Default SUMIF with multiple conditions

Month Reason Value
1 Overcharge$2.34
1 Broken $3.12
2 Overcharge$4.50
2 Broken $3.33
4 Returned $1.34
1 Overcharge$4.50
2 Broken $2.30
1 Returned $5.20

I want to sum all the values for month 1 (January) which were a result of
overcharges, broken etc. and so on for all month. That is if a condition is
column A AND a condition in column B are met, all the values corresponding in
column C must be added.

I tried a number of variations of IF and SUMIF combinations to do this e.g.

=IF(CMSO6304!$E$2:$E$804="Overcharge",SUMIF(CMSO63 04!$J$2:$J$804,"=1",CMSO6304!$D$2:$D$804),)

Anybody have an idea?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default SUMIF with multiple conditions

=SUMPRODUCT(--(A2:A20=1),--(B2:B20="Overcharge"),C2:C20)

--
HTH

Bob

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

"Johan" wrote in message
...
Month Reason Value
1 Overcharge$2.34
1 Broken $3.12
2 Overcharge$4.50
2 Broken $3.33
4 Returned $1.34
1 Overcharge$4.50
2 Broken $2.30
1 Returned $5.20

I want to sum all the values for month 1 (January) which were a result of
overcharges, broken etc. and so on for all month. That is if a condition
is
column A AND a condition in column B are met, all the values corresponding
in
column C must be added.

I tried a number of variations of IF and SUMIF combinations to do this
e.g.

=IF(CMSO6304!$E$2:$E$804="Overcharge",SUMIF(CMSO63 04!$J$2:$J$804,"=1",CMSO6304!$D$2:$D$804),)

Anybody have an idea?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 896
Default SUMIF with multiple conditions

Bob

what does "--" stand for in yr formula?


On 23 Cze, 12:15, "Bob Phillips" wrote:
=SUMPRODUCT(--(A2:A20=1),--(B2:B20="Overcharge"),C2:C20)

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default SUMIF with multiple conditions

It is coercing the TRUE/FALSE arrays returned by the conditional tests into
an array of 1/0s that the PRODUCT part of SUMPRODUCT can work on .

More details http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--
HTH

Bob

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

"Jarek Kujawa" wrote in message
...
Bob

what does "--" stand for in yr formula?


On 23 Cze, 12:15, "Bob Phillips" wrote:
=SUMPRODUCT(--(A2:A20=1),--(B2:B20="Overcharge"),C2:C20)



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
Using SumIf and Multiple Conditions cardosol Excel Discussion (Misc queries) 4 June 12th 08 04:13 PM
SumIF-multiple conditions/OR GaryW New Users to Excel 7 May 15th 08 04:16 PM
sumif with multiple conditions Slax Excel Worksheet Functions 5 April 12th 06 10:27 PM
sumif with multiple conditions Ray Excel Worksheet Functions 8 September 23rd 05 12:20 AM
sumif - multiple conditions J_Barn Excel Worksheet Functions 4 June 28th 05 11:55 PM


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