If, and, or formula.

Occasional Visitor
Hi,
I'm trying to do a complex formula that I THINK uses IF, AND and possibly OR too.
I want to have it so that if H3 states CC then J6 copies H6 regardless of what other cells say (so C6 may say Y or N and D6 may say CC or SW..easy enough.
However, I want it to also say that if H3 states SW, then there are a few things that can happen.
If H3 states SW AND C6 states Y AND D6 states CC then it copies H6 in to J6....but if C6 states N then in J6 I need it to show H6-K6.
Can anyone help?
1 Reply

@MrsVMP 

In J6:

=IF(OR(H3="CC",AND(H3="SW",C6="Y",D6="CC")),H6,IF(AND(H3="SW",C6="N"),H6-K6,""))