Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Spreadsheets SELECTION. 2 Aims  Understand the principles of selection in Excel  Examine the basic IF statement format  Look into Nested IF statements.

Similar presentations


Presentation on theme: "1 Spreadsheets SELECTION. 2 Aims  Understand the principles of selection in Excel  Examine the basic IF statement format  Look into Nested IF statements."— Presentation transcript:

1 1 Spreadsheets SELECTION

2 2 Aims  Understand the principles of selection in Excel  Examine the basic IF statement format  Look into Nested IF statements  Examine the basic COUNTIF Statement  Understand Boolean conditions  Understand Logical conditions

3 Btec National - Principles of Software Development 3 Selection – The IF Statement Selection is all about making decisions. we make decisions all of the time…  If it’s last orders then buy another round  If it’s raining then take an umbrella  If it is 9:30am then think about going to the 9am lecture

4 Selection means we are making decisions based on certain criteria that may or may not be the case If your wallet is empty then you go to the cash point The decision is do we go to the cash point or not The criteria is how much money we may or may not have in our wallet In creating spreadsheets the ability to make decisions is vital.

5 Btec National - Principles of Software Development 5 The IF Statement  Simple format… = If (condition, if True ‘execute the code here’, if False ‘execute the code here’)

6 Btec National - Principles of Software Development 6 In the following code… =IF(E9 = "F","Female","Male") WHAT WHOULD BE THE ANSWER OF THE ABOVE ‘IF STATEMENT’?

7 Nested if =IF(D10 < 10,"Course Cancelled",IF(D10 = 10,"Risky","Course is on")) What would be displayed, if the number in D10 was any of the following: 1, 10, 11, 54

8 Count IF Simple format… = COUNTIF (Range, Where Condition) In Excel, the COUNTIF function counts the number of cells in a range, that meets a given criteria.

9 In the following code… =COUNTIF(H3:H22,“Y") What number would be displayed after the COUNTIF has been executed?

10 Boolean expressions D2 > 18 - D2 D2 > 18 - is D2 greater than 18 D2 < 18 - D2 D2 < 18 - is D2 less than 18 D2 >= 18 - D2 D2 >= 18 - is D2 greater than or equal to 18 D2 <= 18 - D2 D2 <= 18 - is D2 less than or equal to 18 D2 =18 - D2 D2 =18 - is D2 equal to 18 D2 <>18 - D2 D2 <>18 - is D2 not equal to 18

11 Logical expressions  IF(AND(D2 = 16,D14 = 17,if True, if false))   Is D2 equal to 16 AND is D14 equal to 17  IF(OR(D2 = 16,D2 = 17,if True, if false)) -D2 -is D2 equal to 16 OR equal to 17 -IF(NOT(D2 = 16,True, if false)) -D2 -is D2 NOT equal to 16

12 12 Conclusion  Gained some understanding into the principles of selection in Excel  Examined the basic IF statement format  Looked into Nested IF statements  Examined the basic COUNTIF Statement  Gained some understanding into Boolean conditions  Gained some understanding into Logical conditions


Download ppt "1 Spreadsheets SELECTION. 2 Aims  Understand the principles of selection in Excel  Examine the basic IF statement format  Look into Nested IF statements."

Similar presentations


Ads by Google