420 likes | 1.9k Views
Nested IF Statement. Last week we looked at IF statements and looked at IF OR and IF AND. Today’s lesson we will learn about Nested IF.
E N D
Last week we looked at IF statements and looked at IF OR and IF AND. Today’s lesson we will learn about Nested IF. • A nested IF function is a statement that contains at least one IF function inside another. That is, a nested IF function contains another IF statement as one (or both) of the true/false values. In this manner, the original IF function checks for a condition and, depending on the result of that check, it may go on to check another condition.
A basic IF function is of the form below. =IF(condition, value if true, value if false) • On the other hand, nested IF functions can take on a variety of different appearances, depending on how complex the nesting sequence is. One example is shown below. =IF(condition1, value1 if true, IF(condition2, value2 if true, value2 if false))
Task • Lets look an example of a class result data to learn more about nested if • Replicate the data as in the picture
Looking at the formula for nested if try it for the following scenario: • If the percentage correct is 90 or higher, the student will receive an A. If the percentage is 80 or higher but less than 90, the student will receive a B. If the percentage is 70 or higher but less than 80, the student will receive a C. All other students will receive an F. =IF(B2>=90, "A", IF(B2>=80, "B", IF(B2>=70, "C","F")))
Self Assessment • To do the assignments we get in the future we need to make sure we know the below. Therefore do a checklist of the below and if in doubt check the teach-ict website videos to learn about specific topics. 1. Formatting: eg integer, real ,date, currency, text; styling eg bold, italics, borders, shading, column alignment
Conditional formatting • Follow the below link which shows many examples on how to use conditional formatting. http://www.free-training-tutorial.com/conditional-formatting.html • After that follow the task given on the next slide.
Conditional Formatting Excel has good features to compliment the IF statements that we had produced earlier on. • Download the conditional formatting.xlsx file from the website. • Follow instruction given within
Extension • Get into groups of 3-4 and research how to add additional worksheets within excel and and how to link them. • For example in work sheet 1 the user enters 2 numbers in 2 different cells. In worksheet 2, in a given cell, the sum of the two numbers is shown