ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sum Totals/Different Conditions (https://www.excelbanter.com/excel-discussion-misc-queries/227500-sum-totals-different-conditions.html)

KS

Sum Totals/Different Conditions
 
Need help with the following:

Column N contains numeric values (page counts) - I need to add the sum of N
under 2 conditions. N will always contain a numeric value

1) Total of N for all records where A= Y and B= Y
2) Total of N for all records where A= Y and B= N
3) if either of the above conditions are not met, the value in N is not
included

These 2 totals will reside in two diff cells - doesn't matter where, say M1
and M2 respectively.

Thanks in advance for the help

Lars-Åke Aspelin[_2_]

Sum Totals/Different Conditions
 
On Mon, 13 Apr 2009 09:12:04 -0700, KS
wrote:

Need help with the following:

Column N contains numeric values (page counts) - I need to add the sum of N
under 2 conditions. N will always contain a numeric value

1) Total of N for all records where A= Y and B= Y
2) Total of N for all records where A= Y and B= N
3) if either of the above conditions are not met, the value in N is not
included

These 2 totals will reside in two diff cells - doesn't matter where, say M1
and M2 respectively.

Thanks in advance for the help



Try these formulas:

=SUMPRODUCT((A1:A100="Y")*(B1:B100="Y")*(N1:N100))

and

=SUMPRODUCT((A1:A100="Y")*(B1:B100="N")*(N1:N100))

Change the 100's to fit the size of your data in columns A and B

Hope this helps / Lars-Åke

Jacob Skaria

Sum Totals/Different Conditions
 
1)M1 =SUMIFS(N:N,A:A,"Y",B:B,"Y")
2)M2 = =SUMIFS(N:N,A:A,"Y",B:B,"N")

If this post helps click Yes
---------------
Jacob Skaria


"KS" wrote:

Need help with the following:

Column N contains numeric values (page counts) - I need to add the sum of N
under 2 conditions. N will always contain a numeric value

1) Total of N for all records where A= Y and B= Y
2) Total of N for all records where A= Y and B= N
3) if either of the above conditions are not met, the value in N is not
included

These 2 totals will reside in two diff cells - doesn't matter where, say M1
and M2 respectively.

Thanks in advance for the help


KS

Sum Totals/Different Conditions
 
..... works like a charm... ; )

Many Thanks!

"Jacob Skaria" wrote:

1)M1 =SUMIFS(N:N,A:A,"Y",B:B,"Y")
2)M2 = =SUMIFS(N:N,A:A,"Y",B:B,"N")

If this post helps click Yes
---------------
Jacob Skaria


"KS" wrote:

Need help with the following:

Column N contains numeric values (page counts) - I need to add the sum of N
under 2 conditions. N will always contain a numeric value

1) Total of N for all records where A= Y and B= Y
2) Total of N for all records where A= Y and B= N
3) if either of the above conditions are not met, the value in N is not
included

These 2 totals will reside in two diff cells - doesn't matter where, say M1
and M2 respectively.

Thanks in advance for the help



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

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