Add condition to formula

P

Pat

I want to add a condition to a formula so that the formula only returns a
result if the condition is met. Here is the formula:

=SUMIF(PO!$AI$24:$AI$1499,PO!$AI195,PO!$AN$24:$AN$1499)

If an additional cell PO!$AR195 contains the value "Yes" the formula will
return a result. If there is no value in PO!$AR195 then no result will be
returned.

Anyone know how to incorporate the above condition into the formula?

Many thanks if you can help.
Pat
 
R

R.VENKATARAMAN

try this on any empty cell and see whether it gives waht you want

=IF(PO!$AR195="yes",SUMIF(PO!$AI$24:$AI$1499,PO!$AI195,PO!$AN$24:$AN$1499))

========================
 
M

Myrna Larson

To make the cell appear empty if the condition isn't met, you need to specify
the result to be returned in that case -- otherwise you get FALSE, i.e.

=IF(PO!$AR195="yes",SUMIF(PO!$AI$24:$AI$1499,PO!$AI195,PO!$AN$24:$AN$1499),"")
 
B

Bernard Liengme

=SUMIF(PO!$AI$24:$AI$1499,PO!$AI195,PO!$AN$24:$AN$1499)*(PO!$AR195 ='yes")
Gives zero when second condition not met

best wishes
 

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

Sumproduct Help 3
Matching data in 2 different work sheets 3
Cell condition 1
Add to formula 16
Modify and add extra condition 2
Help with SUBTOTAL formula 1
SUM IF Help needed 3
Help with SUMIF function 6

Top