1 Reply Latest reply on Aug 11, 2017 6:17 AM by Zhouyi Zhang

    case or iif or If  for multiple numbers

    Krish Ko

      Hi Gurus,

       

       

      I have scenario  of random numbers like

       

      1,2,3,5,6,7,10,14,16,17,19,21,22,24,26,27,88,123,124,126 etc.

       

      in calculate field I  want display

       

      1,2,3,5                             are   A

      6,7,10,14,16                      are B

      17,19,21,22,24                are   C

      26,27,88,123,124,126    are    D

       

      In case statement or IIF  or If we may handle multiple numbers ?

      Please help me syntax.

       

      Appreciate your response

        • 1. Re: case or iif or If  for multiple numbers
          Zhouyi Zhang

          Hi, Krish

           

          Try this

           

          IF CONTAINS("1,2,3,5", [Your Random Number]) THEN

               "A"

          ELSEIF CONTAINS("6,7,10,14,16", [Your Random Number]) THEN

               "B"

          ELSEIF CONTAINS("17,19,21,22,24", [Your Random Number]) THEN

               "C"

          ELSEIF CONTAINS("26,27,88,123,124,126", [Your Random Number]) THEN

               "D"

          END

           

          Hope this could help

           

          ZZ