## If-then-else

In Excel:

- =if(BOOLEAN condition, what to do if true, what to do if false)
- Example: =if(a4>90,"A","F")
- Can nest:
=if(a4>90,"A",if(a4>80,"B",if(a4>70,"C",if(a4>60,"D","F"))))

General notes

- With floating point values, it is very dangerous to use "=". x=2
is likely to fail, since x could be stored as 1.99999999 or 2.000000001; you
need to test abs(x-2) < 0.0001

*last revision 1/11/2017*