To Sum Up

D

deepak

Dear All,

Suppose that column A and B have the values as below:
A B
Y 4
N 5
Y 10
N 6
Y 8
Y 4

Please help me to calculate the total separately all Y's and all N's so that
Column C will have total of Y----- 26 (as A1, A3, A5 & A6 have Y) and Column
D will have total of N---- (as A2 & A4 have N).
Thank you.
 
J

Jarek Kujawa

=SUMPRODUCT(($A$1:$A$6="y")*($B$1:$B$6))

or
array-entered (=CTRL+SHIFT+ENTER)
=SUM(IF($A$1:$A$6="y",$B$1:$B$6,))

change "Y" to "N" to suit

HIH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top