1

I am not a coder, but I'm trying to work on an excel sheet to make things more efficient at work. I have two formulas that I need to combine and I can't figure it out! please help. I am trying to put this on my T2 cell.

This is the first one. I basically want to say if O2, R2, and S2 =yes, OR if Q2, R2, and S2 =yes, then "yes" otherwise leave blank. This is what I figured out and it is working! =IF(OR(AND(O2="YES",R2="YES",S2="YES"),AND(Q2="YES",R2="YES",S2="YES")),"YES"," ")

However, If O2=NO and Q2=NO, then I want it to say No, otherwise leave blank. I have the two separate formulas but can't figure out how to combine. IF(OR(AND(O2="NO", Q2="NO"),"NO", " ")

I was thinking maybe I can do this: =IF(OR(AND(O2="YES",R2="YES",S2="YES"),AND(Q2="YES",R2="YES",S2="YES")),"YES","NO") the only problem with this is that it automatically fills a NO, even if the cells are blank. I want it to skip it if its blank. Link to spreadsheet image below:

2 Answers 2

2

Test it first, then do the rest of the tests

If (AND(O2="NO",Q2="NO"),"NO",IF(AND(R2="YES", S2="YES",OR(O2="YES",Q2="YES")),"YES",""))

I have also grouped the (R2="YES", S2="YES") as you were checking this twice and you don't need to.

0
0

Put it in the else

=IF(OR(AND(O2="YES",R2="YES",S2="YES"),AND(Q2="YES",R2="YES",S2="YES"));
"YES",
IF(OR(AND(O2="NO", Q2="NO"),
     "NO",
     " "))
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.