Hi all, I'm trying to get the following sheet to return one of four possible outcomes, but no matter what I try it doesn't quite work. I've also tried to upload the mini sample sheet but due to work restrictions on my works laptop it will not allow me to install the add-in.
- C5:8000 and M5:8000 will both contain the same unique ref numbers, but on different rows
- Column J on the same row as column C will have a yes, no or N/A value
- Column R on the same row as Column M will contain a value or blank
- If column J is Yes and M has a value return 'OKAY'
- If column J is No or N/A and M has a value return 'TECH ERROR'
- If column J is Yes and M has no value return "ENGINEER FAILED'
- if column J is No and M has no value return 'NOT REQUIRED'
examples
- C5 & M9 match, J5=Yes & M=Yes this will return 'OKAY'
- C12 & M14 match, J12=No & M14=No this will return 'NOT REQUIRED'
The two ways I went about this so far are
=IF(AND(COUNTIF(M5:M$8000, C1) > 0, J1 = "Yes", NOT(ISBLANK(INDEX(R:R, MATCH(C1, M:M, 0))))), "OKAY", IF(AND(COUNTIF(M:M, C1) > 0, J1 = "No", NOT(ISBLANK(INDEX(R:R, MATCH(C1, M:M, 0))))), "TECH ERROR", IF(AND(COUNTIF(M:M, C1) > 0, J1 = "Yes", ISBLANK(INDEX(R:R, MATCH(C1, M:M, 0)))), "ENGINEER FAILED", IF(AND(COUNTIF(M:M, C1) > 0, J1 = "No", ISBLANK(INDEX(R:R, MATCH(C1, M:M, 0)))), "NOT REQUIRED", ""))))
and
=IFERROR( IF(J5="Yes", IF(NOT(ISBLANK(XLOOKUP(C5, M$5:M$8000, R$5:R$8000, "", 0))), "OKAY", "ENGINEER FAILED"), IF(NOT(ISBLANK(XLOOKUP(C5, M$5:M$8000, R$5:R$8000, "", 0))), "TECH ERROR", "NOT REQUIRED") ), ""
I've spent a couple of days on this so far and I'm struggling!
Any help is greatly appreciated
Thanks in advance
James
- C5:8000 and M5:8000 will both contain the same unique ref numbers, but on different rows
- Column J on the same row as column C will have a yes, no or N/A value
- Column R on the same row as Column M will contain a value or blank
- If column J is Yes and M has a value return 'OKAY'
- If column J is No or N/A and M has a value return 'TECH ERROR'
- If column J is Yes and M has no value return "ENGINEER FAILED'
- if column J is No and M has no value return 'NOT REQUIRED'
examples
- C5 & M9 match, J5=Yes & M=Yes this will return 'OKAY'
- C12 & M14 match, J12=No & M14=No this will return 'NOT REQUIRED'
The two ways I went about this so far are
=IF(AND(COUNTIF(M5:M$8000, C1) > 0, J1 = "Yes", NOT(ISBLANK(INDEX(R:R, MATCH(C1, M:M, 0))))), "OKAY", IF(AND(COUNTIF(M:M, C1) > 0, J1 = "No", NOT(ISBLANK(INDEX(R:R, MATCH(C1, M:M, 0))))), "TECH ERROR", IF(AND(COUNTIF(M:M, C1) > 0, J1 = "Yes", ISBLANK(INDEX(R:R, MATCH(C1, M:M, 0)))), "ENGINEER FAILED", IF(AND(COUNTIF(M:M, C1) > 0, J1 = "No", ISBLANK(INDEX(R:R, MATCH(C1, M:M, 0)))), "NOT REQUIRED", ""))))
and
=IFERROR( IF(J5="Yes", IF(NOT(ISBLANK(XLOOKUP(C5, M$5:M$8000, R$5:R$8000, "", 0))), "OKAY", "ENGINEER FAILED"), IF(NOT(ISBLANK(XLOOKUP(C5, M$5:M$8000, R$5:R$8000, "", 0))), "TECH ERROR", "NOT REQUIRED") ), ""
I've spent a couple of days on this so far and I'm struggling!
Any help is greatly appreciated
Thanks in advance
James