Advanced Functions SET 153L
Logical Function An IF function can place different values in a cell based on some condition. =IF (test, value if true, value if false) The value in a cell should be 0 if the value in A3 is negative, and 1 if the value in A3 is zero or positive. =IF(A3<0, 0, 1)
Example Calculate the result if the following expressions were placed in cell C6 =IF(B3>B2, B3, B2) =IF(B3+B2<B4, 3, 6) =IF(B2+B3/2< B4, “NO”, “YES”)
Stacking IF Functions Multiple IF functions can be used in a single command. =IF(A3<0, “NEG”, IF(A3=0, “ZERO”, “POS”))
AND Function Checks whether all arguments are true. =AND(A3<0, A4<0) AND Function returns a true or false Often used with IF functions =IF(AND(A3<0,A4<0), “Both Neg”, “Both Not Neg”)
Example Create a spreadsheet that solves for the real roots of a quadratic equation: ax 2 + bx +c = 0 Beware of a = 0 and b 2 < 4ac
Example Create a spreadsheet that determines whether students pass a course with at least a grade of 65.0
Example Create a spreadsheet that identifies how many students scored in the “B” range (between 80 and 90%).
LOOKUP Function A powerful function that returns a value based on a table located in Excel.
Example Resistors are color coded where each color is worth a value (a, b, c). The resistance isR = (10a + b) x 10 c Create a spreadsheet that uses a lookup table to determine resistance