Stuck on Nested IF Function

G

Guest

Nested IF function has me stuck. I tried this:
=IF((OR(J2="N",K2="N",M2="N")),"N",(IF((AND(J2="Y",K2="Y",M2="Y")),"Y","")))
Trying to create a function to automatically determine if an engine is fully
assembled in column N.
If the answer is "N" (no) to either columns J, K or M (not L) then column N
must display "N" (no, the engine is not completely assembled). If the answer
is "Y" (yes) to all columns J, K and M (not L) then column N must display
"Y". If all columns J thru M are left blank then column "N" must display
nothing (blank).

J K L M N
Belt Motor Oil Valves Engine Assembled?
1
2 Y N Y N (=IF function)

Does someone know what's wrong with the IF function above?

Regards-Studebaker
 
G

Guest

=IF(AND(COUNTIF(J2:M2,"N")>0,L2<>"N"),"N",IF(AND(COUNTIF(J2:M2,"Y")=3,L2<>"Y"),"Y",""))
 
D

David Biddulph

You didn't define what answer you want if your inputs are a mixture of Ys
and blanks. At present your formula will give a blank result.
Otherwise your formula seems to give the right result.
You can make it a fraction more readable by getting rid of a few of the
parentheses:
=IF(OR(J2="N",K2="N",M2="N"),"N",(IF(AND(J2="Y",K2="Y",M2="Y"),"Y","")))
 

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