3 Replies Latest reply on Jul 5, 2013 8:02 AM by Christy Rogers

    if/then statements, sorting into categories

    Christy Rogers

      If I wrote this:

       

      if [ value] <= 60 then 1

          else

       

              if [ value] > 60 then if [ value] < 160 then 2

          

              else

                 3

              

              end

              end

       

      Does "then 1" mean that you add one to something.  In my data i have ~20 values/minute (w/ diff time stamps hh:mm:ss) If the sum for the values for the minute is less than, say, 60 then I want to give myself 1 point for that minute.  Should I put SUM(value) or just [value]?  If the sum for the values is between 60-160 then I want 2 points for that minute.  And if the sum for the values for the minute is above 160 then I want 3 points for that minute.   So in a day there are X minutes and each of those minutes I get either 1, 2, or 3 points. Then add the total for the score for the day.   Is that the code that I wrote above? maybe partially... I'm pretty sure it's not complete.

       

      I really appreciate your help.

      -Christy