AND and IF Functions

F

fosterp

Hi! Is there anyway to get the AND and IF functions to work correctl
in one formula. I know that you can't nest functions that don't giv
you the same type of answer. Here's what I'm looking to do...

I have three columns (A and B and C). Columns A and B have either Ye
or No entered into them. Column C has a number entered in to it. Wha
I need to do is have Column C's number entered into a new column (colum
D) if both Columns A and B are Yes's. Here's an example:

A B C D
Yes No $500 -
No Yes $200 -
Yes Yes $300 $300

The only way I've been able to figure out is by doing an AND functio
in a new column and then doing the IF function into it's own column.
Basically, I'm just trying to combine the two. Can anyone help?
Thanks
 
A

Aladin Akyurek

With any function call...

=(A1="Yes")*(B1="Yes")*C1

Using IF...

=IF(AND(A1="Yes",B1="Yes"),C1,0)
 
F

Frank Kabel

Hi
in D1 enter
=IF(AND(A1="Yes",B1="Yes"),C1,0)

or as alternative
=(COUNTIF(A1:B1,"Yes")=2)*C1
 

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