nested if statement. last week we looked at if statements and looked at if or and if and. today’s...

9
Nested IF Statement

Upload: james-wright

Post on 22-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 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. A nested IF function

Nested IF Statement

Page 2: 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. A nested IF function

• 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.

Page 3: 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. A nested IF function

• 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))

Page 4: 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. A nested IF function

Task

• Lets look an example of a class result data to learn more about nested if

• Replicate the data as in the picture

Page 5: 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. A nested IF function

• 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")))

Page 6: 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. A nested IF function

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

Page 7: 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. A nested IF function

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.

Page 8: 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. A nested IF function

Conditional Formatting

Excel has good features to compliment the IF statements that we had produced earlier on.

1. Download the conditional formatting.xlsx file from the website.

2. Follow instruction given within

Page 9: 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. A nested IF function

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