3 Replies Latest reply: Oct 4, 2012 8:04 AM by Stefan Wühl RSS

    simplify expression

    Sandro Pividori

      Hi.

      It could simplify the formula in any way?

      if(Nota_Pago >= 50,10,

          if(Nota_Pago >= 20 and Nota_Pago < 50,9,

          if(Nota_Pago >= 5 and Nota_Pago < 20,8,

          if(Nota_Pago >= 0 and Nota_Pago < 5,7,

          if(Nota_Pago >= -10 and Nota_Pago < 0,6,

          if(Nota_Pago >= -20 and Nota_Pago < -10,5,

          if(Nota_Pago >= -35 and Nota_Pago < -20,4,

          if(Nota_Pago >= -50 and Nota_Pago < -35,3,

          if(Nota_Pago >= -65 and Nota_Pago < -50,2,

          if(Nota_Pago >= -80 and Nota_Pago < -65,1,0))))))))))


      For example:

       

      if(Nota_Pago >= 50,10,

                   >= 20 < 50,9,

                   >= 5 < 20,8,

                   >= 0 < 5,7,

                   >= -10 < 0,6,

                   >= -20 < -10,5,

                   >= -35 < -20,4,

                   >= -50 < -35,3,

                   >= -65 < -50,2,

                   >= -80 < -65,1,

                   0)

       

      Regards.