mercredi 15 novembre 2017

How to use IF OR & AND in excel formula

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:

Aucun commentaire:

Enregistrer un commentaire