View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default 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