countif and sum if if two condition are satisfied

Z

zafar62

I have the data as under
A B
S 2
S 3
F 4
F 0
M 5
M 6

I want to count no of cells in Column B which has correspoding F in Column A
and value more than 0, like here the result should be one. And can I make
total also by getting the result 4
Please help
 
J

Jarek Kujawa

=SUM(IF((A1:A10="F")*(B1:B10>0),1,0)) to count the number of cells

=SUM(IF((A1:A10="F")*(B1:B10>0),B1:B10,0)) to show the sum of such
cells

formulas have to be array-entered = CTRL+SHIFT+ENTER
 
B

Bob Phillips

=SUMPRODUCT(--(A2:A200="F"),--(B2:B200>0))

with SUMPRODUCT, you cannot use whole columns you must use an explicit
range, unless you have Excel 2007
 

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

Top