poikl said:
Phil, The formula in Cel-E2 (which is dragged down to 24,000 rows is =VLOOKUP(A2,Deliv.xls!Del,5,0)
I am having a problem with Pookies formula
"=IF(ISNA($E2),IF(OR($D2="AA",$D2="AB"),"Problem",IF(AND(OR($D2="AA",$D2="AB"),OR($E2<>"Pass",$E2<>"Shipped")),"Problem",IF(OR($D2<>"AA",$D2<>"AB",$D2<>"",AND($D2="",$E2="")),"",IF(AND($D2="",OR($E2="Shipped",$E2="Pass")),"Not Designated","OK")))),"OK")"
I think there might be a misprint in Row 3 above {$D2<>"",AND($D2="",}
but I don't know how to change it.
Thank you very much for helping me
Hi poikl,
I turned around the order of the logic you presented to make it easier for me to follow and work with (and hopefully for you). It looks like there are only a couple circumstances that would result in "OK", two that would result in "Not Designated", one in a blank result, and a bunch that would result in "Problem". This is the formula I came up with and should work for all the possibilities I've seen mentioned in the other postings:
=(IF(ISERROR(E2),"Problem",IF(AND(D2="",E2=""),"",IF(AND(D2="",OR(E2="Pass",E2="Shipped")),"Not Designated",(IF(AND(D2="AA",OR(E2="Pass",E2="Shipped")),"OK",IF(AND(D2="AB",OR(E2="Pass",E2="Shipped")),"OK","Problem")))))))
Now let me break it down for you in the same order that this formula follows:
1) IF(ISERROR(E2),"Problem" -
If the VLOOKUP statement in E2 has an error ANY error in it (not just the #N/A error) then the result is "Problem".
2) IF(AND(D2="",E2=""),"" -
If D2 and E2 are both blank then F2 is blank.
3) IF(AND(D2="",OR(E2="Pass",E2="Shipped")),"Not Designated" -
If D2 is blank and E2 = "Shipped" or "Pass" then F2 = "Not Designated".
4) IF(AND(D2="AA",OR(E2="Pass",E2="Shipped")),"OK" -
If D2 = "AA" and E2 = "Pass" or "Shipped" then F2 = "OK".
5) IF(AND(D2="AB",OR(E2="Pass",E2="Shipped")),"OK" -
If D2 = "AB" and E2 = "Pass" or "Shipped" then F2 = "OK".
6) ,"Problem"))))))) -
If one of the preceeding five criteria are not met then F2 will default to "Problem".
Give it a try and let me know how it works for you,
Phil
p.s. Yes, the code for steps 4 & 5 could have been combined using another OR function but I elected to do it this way because it's just a little easier to follow.