ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Trickey SumProduct with Multiple Conditions (https://www.excelbanter.com/excel-worksheet-functions/249401-trickey-sumproduct-multiple-conditions.html)

Benjamin

Trickey SumProduct with Multiple Conditions
 

=SUMPRODUCT(--(A1:A24="Ted"),--(B1:B24="May"),--(C1:C24))
column a <Person, column b <Month, Column C <Cost

I need to total all of Ted's Costs for May.
But Now I need to do it for the quarter.
So for say January, Feburary, March and April, four month blocks.
How would I tweak Sumproduct to do that ...
All cost for those four months.

T. Valko

Trickey SumProduct with Multiple Conditions
 
List the month names for the quarter in a range of cells:

E1 = Jan
E2 = Feb
E3 = Mar
E4 = Apr

F1 = Ted

Then:

=SUMPRODUCT(--(A1:A24=F1),--(ISNUMBER(MATCH(B1:B24,E1:E4,0))),C1:C24)


--
Biff
Microsoft Excel MVP


"Benjamin" wrote in message
...

=SUMPRODUCT(--(A1:A24="Ted"),--(B1:B24="May"),--(C1:C24))
column a <Person, column b <Month, Column C <Cost

I need to total all of Ted's Costs for May.
But Now I need to do it for the quarter.
So for say January, Feburary, March and April, four month blocks.
How would I tweak Sumproduct to do that ...
All cost for those four months.




ryguy7272

Trickey SumProduct with Multiple Conditions
 
Give this a try:
=SUMPRODUCT(--(A1:A24="Ted"),--(B1:B24="January")+(B1:B24="February")+(B1:B24="Ma rch")+(B1:B24="April"),--(C1:C24))

http://www.excelforum.com/excel-work...l-countif.html

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Benjamin" wrote:


=SUMPRODUCT(--(A1:A24="Ted"),--(B1:B24="May"),--(C1:C24))
column a <Person, column b <Month, Column C <Cost

I need to total all of Ted's Costs for May.
But Now I need to do it for the quarter.
So for say January, Feburary, March and April, four month blocks.
How would I tweak Sumproduct to do that ...
All cost for those four months.



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

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