Logic, and the IF Function

Similar documents
Tutorial 3: Working with Formulas and Functions

Functions, Amortization Tables, and What-If Analysis

Intermediate Excel. Winter Winter 2011 CS130 - Intermediate Excel 1

Intermediate Excel. Combination Cell References A B C D E =A1/$A$ =A$1*$B4+B2 3 =A1+A

4. INTERMEDIATE EXCEL

Financial Functions HNDA 1 st Year Computer Applications. By Nadeeshani Aththanagoda. Bsc,Msc ATI-Section Anuradhapura

To complete this workbook, you will need the following file:

Fast Tools & Resources. Machinery Financing

An application program that can quickly handle calculations. A spreadsheet uses numbers like a word processor uses words.

Introduction to Basic Excel Functions and Formulae Note: Basic Functions Note: Function Key(s)/Input Description 1. Sum 2. Product

Loan and Bond Amortization

Budget Manager s Meeting Notes January 17, :00 pm, Aycock Hall, 2 nd Floor Conference Room

Creating a Rolling Income Statement

A. A spreadsheet file contains at least one or more worksheets. A worksheet is a single page in a spreadsheet file.

Computing interest and composition of functions:

Exploring Microsoft Office Excel 2007 Comprehensive Grauer Scheeren Mulbery Second Edition

An Excel Modeling Practice Problem

Problem Set #2. Intermediate Macroeconomics 101 Due 20/8/12

LAB 2 INSTRUCTIONS PROBABILITY DISTRIBUTIONS IN EXCEL

22. Construct a bond amortization table for a $1000 two-year bond with 7% coupons paid semi-annually bought to yield 8% semi-annually.

ExcelBasics.pdf. Here is the URL for a very good website about Excel basics including the material covered in this primer.

FUNDAMENTAL SPREADSHEET APPLICATIONS (230)

DISCLAIMER: Copyright: 2014

SPREADSHEET APPLICATIONS & ANALYSIS (05)

Page Points Score Total: 100

Calculating Markup: A Merchandising Tool

Chapter 6. Evaluating the Financial Impact of Loans and Investments

Bond Amortization. amortization schedule. the PV, FV, and PMT functions. elements. macros

Computing and Data Analysis with Excel

Excellence with Excel for Stock Plan Professionals

Computing compound interest and composition of functions

Master Budget Excel Project

3: Balance Equations

Module 4. Instructions:

Financial Literacy in Mathematics

Full file at

GASB 45 Accounting and Financial Reporting by Employers for Postemployment Benefits Other Than Pensions

ACCT 101 GROUP PROJECT INSTRUCTIONS

Math 1090 Mortgage Project Name(s) Mason Howe Due date: 4/10/2015

January 29. Annuities

MATH 111 Worksheet 21 Replacement Partial Compounding Periods

Optimization Methods in Management Science

You should already have a worksheet with the Basic Plus Plan details in it as well as another plan you have chosen from ehealthinsurance.com.

PENSION ADMINISTRATION BULLETIN

ENGR 122 EXAM 2 Name:

PROPERTY OF CENGAGE LEARNING APPENDIXES

Adding & Subtracting Percents

CMPSCI 311: Introduction to Algorithms Second Midterm Practice Exam SOLUTIONS

Although most Excel users even most advanced business users will have scant occasion

CSV Import Instructions

ENTERING DATA INTO WORKSHEETS IN TEAMS. To get to the budget planning worksheet in TEAMS, from the TEAMS Home Page, in the search box:

Personal Finance Amortization Table. Name: Period:

Excel Proficiency Exercises

Part 3: Debt Sustainability Framework for Low- Income Countries

Excel Tutorial 9: Working with Financial Tools and Functions TRUE/FALSE 1. The fv argument is required in the PMT function.

Competencies or Topics Standards Week Week 1, 2 and 3

Higher National Diploma in Accountancy HNDA 2 nd Year, Second Semester Examination Computer Applications for Accounting.

Background Information. Instructions. Problem Statement. HOMEWORK INSTRUCTIONS Homework #2 Healthcare Expenditures Problem

Using Budget Development in Banner Self-Service

University of Texas at Dallas School of Management. Investment Management Spring Estimation of Systematic and Factor Risks (Due April 1)

Lab 6. Microsoft Excel

Part IV: The Keynesian Revolution:

Problem Set #1 ECON 322, Prof. DeBacker Due Thursday, September 6, 8:30 a.m.

Pinkerton: Case Questions

Monthly Home Budget Workbook. Usage Documentation Version 2.25 January 20, 2013 John DeVito

Financial Functions, Data Tables, and Amortization Schedules. Chapter 4

Technology Assignment Calculate the Total Annual Cost

Copyright 2016 by the UBC Real Estate Division

Lesson Master 7-1B VOCABULARY. USES Objective D. Questions on SPUR Objectives See pages for objectives.

GLOBAL EDITION. Using and Understanding Mathematics. A Quantitative Reasoning Approach SIXTH EDITION. Jeffrey Bennett William Briggs

Bidding Decision Example

File Upload User Guide

The Accounting Cycle, 1 thru 6: Par One Disc Golf

COMPENSATION TOOL CACFP

I. Warnings for annuities and

The three formulas we use most commonly involving compounding interest n times a year are

CASE STUDY. nineteen. Option Pricing. case study OVERVIEW. Application Overview and Model Development. Re-solve Options

FINANCIAL DECISION RULES FOR PROJECT EVALUATION SPREADSHEETS

Simple Interest. Simple Interest is the money earned (or owed) only on the borrowed. Balance that Interest is Calculated On

Math of Finance Exponential & Power Functions

Decision Trees Using TreePlan

Saving and Investing

Essential Question: What is a probability distribution for a discrete random variable, and how can it be displayed?

Cash Flow User Guide SAM Method

Spreadsheet Directions

Chapter 6 Analyzing Accumulated Change: Integrals in Action

Simple Interest. Compound Interest Start 10, , After 1 year 10, , After 2 years 11, ,449.00

EasyDent Enhancements 2017

Class 8 Compound Interest

Financial Literacy Course. East High School Module 2

MJB&A Clean Power Plan Compliance Tool. v 1.0. User Guide M A Y 1 2, (978) /

LamLum: A Tool for Evaluating the Financial Feasibility of Laminated Lumber Plants

Using the Burn Rate Tool

FACULTY OF COMMERCE OSMANIA UNIVERSITY B.Com V-Semester CBCS (Computer and Computer Applications course) Excel Foundation Computer Lab Question Bank

The Process of Modeling

ESD.70J Engineering Economy

Problem Set #2. Intermediate Macroeconomics 101 Due 20/8/12

Notice how your Expenses are calculated to a full year for your budget.

Interest Compounded Annually. Table 3.27 Interest Computed Annually

Creating formulas that use dates and times can be a little confusing if

Transcription:

Comparison Operators Logic, and the IF Function You can use comparison operators to compare two numbers, functions, formulas, or labels and return either true or false. Examples include: =2*3=4+2 =A1>0 =average(a1:a10)>50 Every conditional test must include at least one comparison operator. As an example, in the formula =A1>0, the comparison operator is >. The following six comparison operators exist in Excel: Comparison Operator Definition = Equal to <> Not equal to < Less than <= Less than or equal to > Greater than >= Greater than or equal to IF Built-In Function The IF function allows our spreadsheet to make a decision when analyzing the data. The function asks the question: Is some condition true or false? Based on the answer to that question, you can specify different behaviors. The IF function checks a condition that must be either true or false. If the condition is true, the function returns one value; if the condition is false, the function returns another value. The syntax of the IF function is: =IF(logical_test, value_if_true, value_if_false) =IF( A1 > 100, Over 100, 100 or less ) =IF( A1 + A2 < 100, A1 +A2, 100)

Example 1 2 3 A B Place a numeric value in Cell A1, B1, A2, and B2. In Cell A3, write an =IF() formula to display the larger value from A1 or A2. In Cell B3, write an =IF() formula to display which value is larger, B1 or B2. For Cell B3, display either the text B1 or the text B2. Write the formula for Cell A3 here : How many other ways can you write an equivalent =IF() formula? What happens if the values in Cell A1 and A2 are equivalent? Example Examine the following spreadsheet that shows activity on a bank account. For type W the amount is withdrawn from the balance. For type D, the amount is added to the bank balance. A B C D 1 Initial Balance $3,874.00 2 3 Date Amount Type Balance 4 January 2, 2006 $34.50 W $3,839.50 5 January 4, 2006 $100.00 D $3,939.50 6 January 5, 2006 $20.00 W $3,919.50 What is the formula in cell D4 that could correctly be filled down to later transactions on the balance? Write it here: 3.1 Exercise Name the worksheet Overtime You are the owner of a small business and every month you need to take a person's hours-worked and hourly wage and calculate gross and net pay. Gross pay is hours worked times hourly wage and net pay is gross pay minus: (1) Social Security (7.65%) (2) State Income Tax (8.5%) and (3) Federal Income Tax (15%). Set up a worksheet that allows the user the ability to enter hours worked, hourly wage, and each of the three tax rates listed above; your worksheet then displays: Gross Pay, Social Security Paid, State Income Tax Paid, Federal Income Tax Paid, Net Pay. Your worksheet must handle overtime such that any hours over 40 earn time and one half. If a person was making $5.00 per hour and worked 45 hours, for 5 hours they made $7.50 per hour.

Logical Operators Sometimes our logical_test needs to use a logical function such as AND and OR: The syntax for each of these statements is: OR(logical_test#1, logical_test #2) AND(logical_test#1, logical_test #2) For the OR construct, a value of TRUE is returned if EITHER of the logical tests returns a value of TRUE; otherwise, a value of FALSE is returned to the cell. For the AND construct, a value of TRUE is returned if BOTH of the logical tests return a value of TRUE; otherwise, a value of FALSE is returned to the cell. Note that you can have more than TWO logical tests within an OR or AND statement by simply separating each subsequent logical test with a comma. Often, the OR and AND constructs are used within an IF statement. For example, the statement IF( AND(1<2,4=3),"HELLO","GOODBYE") will return to the cell "GOODBYE" because both 1<2 and 4=3 are not true. However, the statement will return "HELLO" to the cell. IF( AND(1<2, 4=4),"HELLO", "GOODBYE") Examples of the IF function with logical AND and OR A B C D E 1 Name District Sales Emp. Yrs Job Level 2 Linda East $20,000.00 2 3 Joe West $42,302.00 9 4 Bill East $53,001.00 3 5 Mary South $12,000.00 12 6 Mark South $ 2,050.00 6 7 John North $9,000.00 0 8 Ted East $40,000.00 4 This data shows salespeople s district, annual sales, and number of years employed by a company. Now, let s suppose you want a formula in column E that will assign a job level based on two different criteria: Salespeople who have been employed for more than 5 years AND have annual sales of more than $10,000 should be assigned a job level code of 2, and all others should have a job level code of 1. Write down the formula here:

3.2 Exercise Name the worksheet 3.2 Difference Create a spreadsheet that contains two columns of numbers (X, Y). The third column (Difference) should display the difference between the two numbers as a positive number. Assume the values for X and Y are positive. Nested IF Functions Recall that the syntax for IF functions is: X Y Difference 43 26 17 75 17 58 23 66 43 87 41 46 32 74 42 17 82 65 98 16 82 68 85 17 =IF(logical_test, value_if_true, value_if_false) The (value_if_true) and (value_if_false) arguments can be: Values (numbers, strings, etc.) References (A1, B1, etc.) Functions (INT, SUM, IF) When you use an IF as an argument in an IF function, then you have nested Ifs. What does the following IF logic mean: =IF(A1 < 100, B1*0.01,IF(A1<1000,B1*0.02,B1*0.03)) What is the range of values that produces the result B1*0.01? What is the range of values that produces the result B1*0.02? What is the range of values that produces the result B1*0.03?

3.3 Example Name the worksheet Commission Let s say that you wanted to output the rate of commission that a salesperson receives based on the amount of sales they have generated for that month. Commissions are based on the following: From $1 to $10 earns 10% commission From $10.01 to $100 earns 15% commission Anything over $100 earns 20% commission A B C Amount of Sales Percentage of Commission Amount of Commission 1 $15.00 15.00% $2.25 2 $253.00 20.00% $50.60 3 $10.00 10.00% $1.00 4 $84.00 15.00% $12.60 5 $12.00 15.00% $1.80 6 $5.00 10.00% $0.50 7 $32.00 15.00% $4.80 8 $56.00 15.00% $8.40 9 $150.00 20.00% $30.00 10 $120.00 20.00% $24.00 What is the formula that you would write in cell C1 that would fill down up to cell C10? Write the formula here: 3.4 Exercise Name the worksheet Grades Consider the following data: Name ID# Quiz1 Quiz2 Midterm Final Adams 0001 14 23 82 76 James 0002 12 21 76 68 Jones 0003 15 24 91 93 Mann 0004 14 19 88 73 Smith 0005 11 16 79 71 Tolls 0006 10 13 62 65 Wells 0007 5 10 43 55 Max Points 15 25 100 100 Part I: Add two additional columns as follows: (a) Average is a person's total points divided by the max points possible (b) Grade is 90-100 A, 80-90 B, 70-80 C, 60-70 D, 0-60 F.

Part II: Create a Pie Chart that shows the percentage of A's, B's, etc. You will need to add cells containing the number of A s, number of B s, etc. Hint: you will need to use the COUNTIF function. You can look up how it works in Excel help. NPER Financial Function Another useful financial function is NPER, which calculates the number of periods for an investment based on periodic, constant payment and a constant interest rate. 3.5 Exercise Name this worksheet Retirement Based on your budget and salary, you have worked out that you will have $1,000,000 (yes one million dollars) when you retire. You estimate that you will draw out $50,000 a year to live on and the remainder will go into a bank account with a 4% interest rate compounded yearly (yearly interest rate). a. Use the NPER function to work out how many years it will be before you run out of money. b. Create a payment or amortization schedule for this period and verify that the result of the NPER function is correct. Your table should contain columns for payment period, beginning balance, amount withdrawn, interest added and final balance for every payment period. Question: Is the payment period in months or years? c. Add a chart to your worksheet showing the decline in your balance till it reaches zero.