70 likes | 243 Views
If Function. IF() Function. IF( test expression , value if true , value if false ) Returns one or the other value, depending on the truth or falsity of the test expression For example, create column for Pass/Fail IF(G4>=60,”PASS”, “FAIL”) . IF() Function .
E N D
IF() Function • IF(testexpression, value if true, value if false) • Returns one or the other value, depending on the truth or falsity of the test expression • For example, create column for Pass/Fail • IF(G4>=60,”PASS”, “FAIL”)
Nesting IF() Functions • Suppose: • Column G contains the average value of test scores. • In column H, display letter grades (A, B, or C) as follows. • If score >= 90, then grade Is A • If score < 90, but >= 80, then grade is B • If score < 80, but >= 70, then grade is C • If score < 70, but >= 60, then grade is D • Otherwise, grade is F
Nested IF() Function • IF(G4>=90,”A”, IF(G4>=80,”B”, IF(G4>=70,”C”, IF(G4>=60,”D”, “F”) ) ) )
VLOOKUP() Function • VLOOKUP Function • VLOOKUP(value to look up, range of cells containing table, column-number in the table that contains the result) • Table of break-point (lowest value) for the grade, must be in ascending order