Hi cDuck28Z;
So here's how I solve complex formulas.
I break them down into separate cells with each cell having just one function:
Your formula in D9
=IF(C9="","",IF(VLOOKUP(VLOOKUP(LEFT(C9,FIND("-",C9)-1)&"*",A:A,1,0),A:B,2,TRUE)=4,"Yes",""))
I break it down like so:
F9 : =FIND("-",C9) '4
G9 : =LEFT(C9,F9-1) 'XXP
H9 : =VLOOKUP(G9&"*",A:A,1,0) 'XXP-A
I9 : =VLOOKUP(H9,A:B,2,TRUE) '1
J9 : =IF(I9=4,"Yes","") '""
D9 : =IF(C9="","",J9) '""
With it broken down like this I can see that I9 (=VLOOKUP(H9,A:B,2,TRUE)) is producing the wrong result. I start testing by changing all the "1"s to "2" in column B until I find the one that I9 is finding, and I discover that I9 is finding Row 16 "XXLA-1"
Once I fix the formula in I9 then I start putting the formula back together.
D9 : =IF(C9="","",J9)
1) In D9, replace "J9" with the formula from J9
I literally do a cut & paste. I copy the contents of J9 (except the "="), select D9, highlight "J9" and paste. so I now have:
D9 : =If(C9="","",IF(I9=4,"Yes",""))
2) Replace "I9" with the formula from I9
D9: =If(C9="","",IF(VLOOKUP(H9,A:B,2,TRUE)=4,"Yes",""))
etc.
Bookmarks