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

Slides:



Advertisements
Similar presentations
Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
Advertisements

Chapter 4: Control Structures I (Selection)
How to use Excel to create a seating plan and ticket sales model
If Statements, Try Catch and Validation. The main statement used in C# for making decisions depending on different conditions is called the If statement.
CS 101 Introductory Programming - Lecture 7: Loops In C & Good Coding Practices Presenter: Ankur Chattopadhyay.
Chapter 13 Control Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Control Structures Conditional.
CIS100 Test 2 Review REACH CRC © 2011 REACH CRC. All Rights Reserved.Spring 2011.
Spreadsheet Software (Advanced Topics) Microsoft Excel.
REACH CRC © 2011 REACH CRC. All Rights Reserved.Fall 2011.
MONTEGO BAY HIGH SCHOOL INFORMATION TECHNOLOGY THE EXCEL IF FUNCTION.
What IF?.
情報基礎 B Lecture 5 Takeshi Tokuyama Tohoku University Graduate School of Information Sciences System Information Sciences Design and Analysis of Information.
Computer Science & Engineering 2111 IF and Boolean Functions 1 CSE 2111 Lecture-IF and Boolean Functions.
CS&E 1111 ExIFs IFs and Nested IFs in Excel Objectives: Using the If function in spreadsheets Nesting If functions.
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 4 Making Decisions in a Program.
Selection (decision) control structure Learning objective
Decisions (Conditional Programming) Chapter 5 (Sec. 5.1 & 5.2)
2-1 Making Decisions Sample assignment statements PayAmount = Hours * Rate PayAmount = 40*Rate + (Hours – 40)*Rate*1.5.
Lecture Excel: Counting & Conditional Functions. Counting Cells Count: Number of non-blank, non-text cells CountA: Non-blank cells CountBlank: Counts.
Programming with MATLAB. Relational Operators The arithmetic operators has precedence over relational operators.
Chapter 9 IF Statement Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2012.
09. Excel NPV and Goalseek. Discounted Cashflow modelling The key to estimating the value of an asset is to convert future cashflows to present value.
Theme 3: Data Dynamics Topic 18: Analyse data using Excel Chapter 3.3. Page 185 – 199 Analysing spreadsheet data.
Data Analysis Formula and Functions. Formula and functions A function is a calculation in a spreadsheet that has or can be memorized. There are many different.
ADVANCED EXCEL FORMULAS 1 Lesson 8. Named Ranges Name a cell or a range of cells Can make formulas easy to understand =SUM(Sales) instead of =SUM(A2:A16)
Zhen Jiang Dept. of Computer Science West Chester University West Chester, PA CSC141 Computer Science I.
Python – Making Decisions Lecture 02. Control Structures A program that only has one flow is useful but limited. We can use if statements to make these.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
PAGES:51-59 SECTION: CONTROL1 : DECISIONS Decisions.
1. We’ve learned that our programs are read by the compiler in order, from top to bottom, just as they are written The order of statement execution is.
Lesson 5: Working with Formulas and Functions Logical and 3D Formulas.
CS&E 1111 ExLogic Microsoft Excel Logical Functions Objectives: Using Boolean Logic in Spreadsheets l Relational operators l Boolean operators –Functions.
Unit 4, Lesson 4 Using Function Formulas. Objectives Understand function formulas. Understand function formulas. Use the Average and Sum functions. Use.
Saeed Ghanbartehrani Summer 2015 Lecture Notes #5: Programming Structures IE 212: Computational Methods for Industrial Engineering.
If…else statements. Boolean Expressions Boolean expression - An expression whose value is either true or false true = 1 false = 0 Datatype: boolean.
1 2. Program Construction in Java. 2.4 Selection (decisions)
Copyright 2003 Scott/Jones Publishing Making Decisions.
Conditional Expression One of the most useful tools for processing information in an event procedure is a conditional expression. A conditional expression.
Computer Science: A Structured Programming Approach Using C1 5-2 Two-Way Selection The decision is described to the computer as a conditional statement.
Computer Science: A Structured Programming Approach Using C1 5-2 Two-Way Selection The decision is described to the computer as a conditional statement.
Copyright © 2012 Pearson Education, Inc. Chapter 4: Making Decisions.
More Spreadsheets Range Formulas & Empty Cells Logical Functions Lookup Functions.
where to get help basic function writing tricks = tells excel you want to write a function The function then tells you what you need to enter Then you.
DECISIONS AND FUNCTIONS Module 4.2. DECISIONS AND FUNCTIONS Module 4.2.
Intermediate Excel 2013 Gareth Johns IT Skills Development Advisor.
Lesson thirteen Conditional Statement "if- else" ©
Conditional statements and boolean expressions Arithmetic, relational and logical operators.
Control Flow (Python) Dr. José M. Reyes Álamo. 2 Control Flow Sequential statements Decision statements Repetition statements (loops)
Zhen Jiang Dept. of Computer Science West Chester University West Chester, PA CSC141 Computer Science I.
USING CONDITIONAL CODE AMIR KHANZADA. Conditional Statement  Conditional statements are the set of commands used to perform different actions based on.
Control Flow (Python) Dr. José M. Reyes Álamo. 2 Control Flow Sequential statements Decision statements Repetition statements (loops)
Conditional Statements A conditional statement lets us choose which statement will be executed next Conditional statements give us the power to make basic.
LESSON 3 Working with Functions, Formulas, and Charts.
IF Statements flowcharts and pseudocode Please open the speaker notes - they contain additional information!
Control Flow (Python) Dr. José M. Reyes Álamo.
Excel: Counting & Conditional Functions
Sequence, Selection, Iteration The IF Statement
Chapter 4: Making Decisions.
2-1 Making Decisions Sample assignment statements
Computers & Programming Languages
Chapter 4: Decision Structures and Boolean Logic
Pages:51-59 Section: Control1 : decisions
Visual Basic – Decision Statements
Conditional Logic Presentation Name Course Name
Understanding Conditions
Relational Operators.
There many situations comes in real life when we need to make some decisions and based on these decisions, we decide what should we do next. Similar situations.
REACH Computer Resource Center
Pages:51-59 Section: Control1 : decisions
Chapter 4: Decision Structures and Boolean Logic
Presentation transcript:

1 Spreadsheets SELECTION

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

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

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.

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

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’?

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

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.

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

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

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