2 Replies Latest reply on Dec 19, 2014 8:50 AM by BerkleyKeen

    Case Statement  or Nested IF Statement

    BerkleyKeen

      Title

      Case Statement  or Nested IF Statement

      Post

      I am trying to create a calculated field (req_met) based on a "Yes" response to either field_a or field_b. If field_a has a "Yes" response, I want a "Yes" response input to calculated field (req_met) and no further tests are required. If field_a has a "No" response, I want to test field_b for a "Yes" or "No" response. If field_b has a "Yes" response, I want a "Yes" response input to req_met. Otherwise, I want a "No" response input to req_met. I have tried several calculations using "IF" statements and "Case" statements, however; I am not getting the correct responses. I appreciate any comments or suggestions.

       

      DBK

        • 1. Re: Case Statement  or Nested IF Statement
          SteveMartino

          Could you try to rephrase the question?  Either I don't understand your terms, or I cant follow your logic. 

          Can both fields be Yes or both fields be No?

          So if field_a has a Yes or field_b has a Yes, you want the response to be 'Yes' otherwise you want the response to be 'No'

          For your calculation in the req_met field (if I follow you):

          Case ( field_a = "Yes" or field_b=yes; "Yes";'No")

           

           

          • 2. Re: Case Statement  or Nested IF Statement
            BerkleyKeen

            Steve

            Thanks for your post. If either field_a or field_b have a "Yes" answer, the req_met should be "Yes" and otherwise should be "No". I tested using the "MAX" function and it worked as long as either of the fields have a "Yes". I can see that it would not always work. I tried your suggestion with the "Case" statement and after several attempts it worked fine. I have since used the "Case" statement in other applications. I appreciate your comments.

            DBK