Three condition "if" statements

T

Tel

I'm trying to write an IF statement that needs to look at the input of three
cells (D4, D5 and D6).

If any of them are "YES" then I need cell E4 to = cell G1. However,
If they are all "no" then I need cell E4 to = cell G2

Finally, if they are all blank then I need cell e4 to be blank

Also, if I do this can I conditionally format cell E4 so if it = G1 then it
is White text on a red background, and if it = G2 then it is Black text on a
green background (I'm okay with CF just need to know if it's possible)

Looking forward to your replies.

TVM

Terry
 
M

Ms-Exl-Learner

Try this in E4 Cell

=IF(OR(D4="YES",D5="YES",D6="YES"),G1,IF(AND(D4="NO",D5="NO",D6="NO"),G2,IF(AND(D4="",D5="",D6=""),"","Value is not Matching the Criteria")))

If this post helps, Click Yes!
 
T

Tel

Many thanks for your reply, I've astounded myself by being able to work it
out, as follows:

=IF(AND(D4=G5,D5=G5,D6=G5),G11,IF(OR(D4=G4,D5=G4,D6=G4),G2,""))

The CF was simple too, essentially Condition 1 Cell Value is - equal to -
=G1 (Set format)
Condition 2 Cell Value is - equal to - -G2 (Set format)

Probably basic to others but someone might find it useful.

Terry
 

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