My scripting experience is negligible and I received help writing the formula in Excel, but when I try to use it in the field calculator, it doesn't work. I converted the formula to VB script and then pasted it, and it didn't work. I need the field [Risk] to be contingent on the data entered into the prior three fields. There are 64 possible combinations of which there are 15 unique combinations, everything else being the same result. Based on what I've read, it seems it would be an IFTHENELSE statement but for three variables.
Here's the formula from excel:
=IF(AND(O2="Imminent",P2="High",Q2="Minor"),"Moderate",IF(AND(O2="Imminent",P2="Low",Q2="Severe"),"Moderate",IF(AND(O2="Imminent",P2="Low",Q2="Significant"),"Moderate",IF(AND(O2="Imminent",P2="Medium",Q2="Minor"),"Moderate",IF(AND(O2="Possible",P2="High",Q2="Severe"),"Moderate",IF(AND(O2="Possible",P2="High",Q2="Significant"),"Moderate",IF(AND(O2="Probable",P2="High",Q2="Minor"),"Moderate",IF(AND(O2="Probable",P2="Medium",Q2="Severe"),"Moderate",IF(AND(O2="Probable",P2="Medium",Q2="Significant"),"Moderate",IF(AND(O2="Imminent",P2="High",Q2="Significant"),"High",IF(AND(O2="Imminent",P2="Medium",Q2="Severe"),"High",IF(AND(O2="Imminent",P2="Medium",Q2="Significant"),"High",IF(AND(O2="Probable",P2="High",Q2="Severe"),"High",IF(AND(O2="Probable",P2="High",Q2="Significant"),"High",IF(AND(O2="Imminent",P2="High",Q2="Severe"),"Extreme","Low")))))))))))))))
Suggestions?
Here's the formula from excel:
=IF(AND(O2="Imminent",P2="High",Q2="Minor"),"Moderate",IF(AND(O2="Imminent",P2="Low",Q2="Severe"),"Moderate",IF(AND(O2="Imminent",P2="Low",Q2="Significant"),"Moderate",IF(AND(O2="Imminent",P2="Medium",Q2="Minor"),"Moderate",IF(AND(O2="Possible",P2="High",Q2="Severe"),"Moderate",IF(AND(O2="Possible",P2="High",Q2="Significant"),"Moderate",IF(AND(O2="Probable",P2="High",Q2="Minor"),"Moderate",IF(AND(O2="Probable",P2="Medium",Q2="Severe"),"Moderate",IF(AND(O2="Probable",P2="Medium",Q2="Significant"),"Moderate",IF(AND(O2="Imminent",P2="High",Q2="Significant"),"High",IF(AND(O2="Imminent",P2="Medium",Q2="Severe"),"High",IF(AND(O2="Imminent",P2="Medium",Q2="Significant"),"High",IF(AND(O2="Probable",P2="High",Q2="Severe"),"High",IF(AND(O2="Probable",P2="High",Q2="Significant"),"High",IF(AND(O2="Imminent",P2="High",Q2="Severe"),"Extreme","Low")))))))))))))))
Suggestions?