How do I use if statements to cover ranges?

by on January 7, 2012

Q: how can i combine if and statements for several ranges? helppppp!

Ex:
If the achieved line is within the certain range use that percent.

Range Percent Achieved
98 – 99.9% 90% 90.300
95 – 97.9% 80% 90.000
92 – 94.9% 70% 100.000
89-91.9% 60%


One Response to “How do I use if statements to cover ranges?”
  1.  

    It really depends on what language you are using but the basics would be that you would do something like

    if (value < = 99.9 value > 98)

    else if (value < 98 AND value > 95)

    The key here is you really have to figure out where you want greater than or equal to or less than and equal to vs just greater than and/or less than.