Sie sind auf Seite 1von 11

IF function

Delivers 1 of 2 things to a cell or formula You can deliver: Words, Numbers, or Formulas to a cell or formula

argument 1 argument 2 argument 3


Exercise 1

This is a TRUE/FALSE test. The test either evaluates to TRUE, or FALSE


What to put in the cell if the test evaluates to TRUE What to put in the cell if the test evaluates to FALSE

Q. According to a policy of XYZ Co., a salesperson will get a bonus of $400.00 if his sales exceed $50, 000.00 per month. Following is the monthly sales figure of each employee. Calculate their bonus amount.

Employee name

Sales per month

Do You Get Bonus? yes yes no no no yes yes yes

Your Bonus Amount? 400 400 0 0 0 400 400 400

Amby Betsy Chris David Emphy Feebie Goldie Henry


Exercise 2 Debit Numbers $58 $30 $43 $21

$54,000.00 $51,890.00 $49,999.00 $45,000.00 $50,000.00 $54,000.00 $51,490.00 $57,000.00

Credit Numbers $58 $30 $43 $21 $5 $157

$152 Is the Debit and Credit amount in balance? no Exercise 3 Q.Is it a net income or net loss or break even?

Sales Expenses net income Sales Expenses breakeven pt

$5,500.00 $3,450.00 $2,050.00 5,500.00 5,500.00


0.00

Name A B C D

dob 15-Oct-87 26-Jan-00 8-Sep-87 15-Jun-99

status no no no no

ll or formula

evaluates to TRUE, or FALSE

s to TRUE

s to FALSE

0.00 if his sales exceed $50, 000.00 Calculate their bonus amount.

IF Function: Put 1 of 2 things into a cell based on a logical test AND Function: When all logical tests are passed, AND delivers a TRUE If any one of the tests come out FALSE, AND delivers a FALSE OR Function: When at least 1 logical tests is passed, OR delivers a TRUE If any one of the tests come out TRUE, OR delivers a TRUE Exercise 1: IF function Exercise 2: AND function with 2 logical tests inside IF function Exercise 3: OR function with 2 logical tests inside IF function Exercise 4: AND function with 3 logical tests inside IF function Exercise 5: AND and OR Functions to create a "None" Logical Test Exercise 6: AND and OR Functions to create a complex Logical Test
Exercise 1

IF Function when there is only 1 Logical Test Hurdle to Extend Credit: Credit Rating 6 out of 10 1 Condition Must Be Met To Extend Credit Customer Credit Rating Logical Test/Formula Customer 1 4.0 no Customer 2 5.5 no Customer 3 6.0 yes Customer 4 3.0 no Customer 5 6.2 yes
Exercise 2

Test: Credit Rating >= 6 Extend Credit? no no yes no yes

IF Function with AND Function when there are 2 Logical Tests Hurdle to Extend Credit: Credit Rating 6 Sales $500,000.00 2 Conditions/Criteria Must Be Met To Extend Credit Credit Rating Last Years Sales Extend Credit? 1 4.0 $1,043,462.00 no 2 5.5 $792,157.00 no 3 6.0 $831,594.00 yes 4 3.0 $335,410.00 no 5 6.2 $490,000.00 no Test: Credit Rating >= 6 AND Sales >= 500000

Customer Customer Customer Customer Customer Customer

Exercise 3

IF Function with OR Function when there are 2 Logical Tests, but only 1 must be true Hurdle to Extend Credit: Credit Rating 6 Sales $500,000.00

1 Condition or the other or both ("At Least 1") Must Be Met To Extend Credit Customer Credit Rating Last Years Sales Extend Credit? Customer 1 4.0 $1,043,462.00 yes Customer 2 5.5 $792,157.00 yes Customer 3 6.0 $831,594.00 yes Customer 4 3.0 $335,410.00 no Customer 5 6.2 $490,000.00 yes
Exercise 4

Test: Credit Rating >= 6 OR Sales >= 500000

IF Function with AND Function when there are 3 Logical Tests Hurdle to Extend Credit: Credit Rating 1 6 out of 10 Sales $500,000.00 Credit Rating 2 2.5 out of 5

Test: Credit Rating 1 >= 6 AND Sales >= 500000 AND Credit Rating 2 > 2.5

Customer Customer Customer Customer Customer Customer

1 2 3 4 5

3 Conditions/Criteria Must Be Met To Extend Credit Credit Rating 1 Credit Rating 2 Last Years Sales 4.0 1.3 $1,043,462.00 6.0 2.7 $792,157.00 7.0 2.6 $831,594.00 3.0 1.4 $335,410.00 6.2 3.2 $490,000.00

Extend Credit? no yes yes no no

Exercise 5

AND and OR Functions together to create "None" Logical Test Hurdle to Extend Credit: Credit Rating 1 6 out of 10 Sales $500,000.00 Credit Rating 2 2.5 out of 5

Test: Credit Rating 1 >= 6 AND Sales >= 500000 AND Credit Rating 2 > 2.5

Customer Customer Customer Customer Customer Customer

1 2 3 4 5

3 Conditions/Criteria Must Be Met To Extend Credit Credit Rating 1 Credit Rating 2 Last Years Sales No Test Passed 4.0 1.3 $1,043,462.00 6.0 2.7 $792,157.00 7.0 2.6 $831,594.00 3.0 1.4 $335,410.00 6.2 3.2 $490,000.00

Exercise 6

IF Function with AND and OR Function Hurdle to Extend Credit: Credit Rating 1 6 out of 10 Sales $500,000.00 Credit Rating 2 2.5 out of 5

Test: Credit Rating 1 >= 6 AND Sales >= 500000 OR Credit Rating 2 > 2.5

1 Conditions Must Be Met and at Least One Of The Other Two Tests Must Be Met To Extend Credit Customer Credit Rating 1 Credit Rating 2 Last Years Sales Extend Credit? Customer 1 4.0 1.3 $1,043,462.00 Customer 2 6.0 2.7 $792,157.00 Customer 3 7.0 2.6 $831,594.00 Customer 4 3.0 1.4 $335,410.00 Customer 5 6.2 3.2 $490,000.00

Credit Rating >= 6 Sales >= 500000

Credit Rating >= 6 Sales >= 500000

Exercise 1

Lab A Sample 1 Sample 2 Sample 3 Sample 4 Sample 5 Sample 6 Sample 7 Sample 8 Sample 9 Sample 10
Exercise 2

Lab B 2 9 3 7 8 3 5 4 7 0 3 7 5 4 8 4 7 6 7 2

Which is Larger ?

Q.Publish the result of the students based on the following criterion Criterion:A student passes an examination if he scores greater than or equal to 70 else he is fail. Students Test Score Result Student 1 35 Student 2 67 Student 3 88 Student 4 70 Student 5 95
Exercise 3 Q. Calculate the Grade of the above students based on the following criteria

Test score Greater than 89 From 80 to 89 From 70 to 79 From 60 to 69 Less than 60


Exercise 4

Grade A B C D F

Mr. Arvind purchased cement of value Rs. 7,123.26 from XYZ Co. on 19th Feb 2012. According to company's policy the payment should be made in 3 months time. If the client fails to do so, he is charged with interest based on the following interest rate chart. Calculate the total outstanding amount of Mr. Arvind as on today.

Invoice Total Due Invoice Due Date Today Days Invoice Over Due Late Fee

Days Invoice Overdue

Description

Interest Rate Late Fee

0 10 20 30 40 50 90 120

Over 0 Over 10 but less than 20 Over 20 but less than 30 Over 30 but less than 40 Over 40 but less than 50 Over 50 but less than 90 Over 90 but less than 120 Over 120 but less than

0.00% 1.00% 2.00% 3.00% 4.00% 5.00% 6.00% 7.00%

Das könnte Ihnen auch gefallen