Sie sind auf Seite 1von 12

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

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

yes yes no no no yes yes yes

400 400 400

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

$152 Is the Debit and Credit amount in balance?

false

Exercise 3 Q.Is it a net income or net loss or break even?

Sales Expenses

$5,500.00 $3,450.00 net income 5,500.00 5,500.00


Breakeven

profit

Sales Expenses

be

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.

YES YES FALSE FALSE FALSE YES YES YES

NO

YES YES NO NO NO YES YES YES 5 NO OF SALES PERSON ELIGLIBLE FOR BONUS TOTAL BONUS DISBURSED

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 Credit Rating Logical Test/Formula 1 4.0 FALSE 2 5.5 yes 3 6.0 yes 4 3.0 FALSE 5 6.2 yes

Customer Customer Customer Customer Customer Customer

Extend Credit?

Exercise 2

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? 4.0 $1,043,462.00 NO CREDIT 5.5 $792,157.00 NO CREDIT 6.0 $831,594.00 EXTEND CREDIT 3.0 $335,410.00 NO CREDIT 6.2 $490,000.00 NO CREDIT

Customer Customer Customer Customer Customer Customer

1 2 3 4 5

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

Credit Rating 1 2 3 4 5 4.0 5.5 6.0 3.0 6.2

Last Years Sales $1,043,462.00 $792,157.00 $831,594.00 $335,410.00 $490,000.00

Extend Credit? EXTEND CREDIT EXTEND CREDIT EXTEND CREDIT NO CREDIT EXTEND CREDIT

Exercise 4

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

AND AND

Customer Customer Customer Customer Customer Customer

1 2 3 4 5

Credit Rating 1 4.0 6.0 7.0 3.0 6.2

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

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

AND AND

Customer Customer Customer Customer Customer Customer

1 2 3 4 5

Credit Rating 1 4.0 6.0 7.0 3.0 6.2

3 Conditions/Criteria Must Be Met To Extend Credit Credit Rating 2 Last Years Sales 1.3 $1,043,462.00 2.7 $792,157.00 2.6 $831,594.00 1.4 $335,410.00 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

Customer

1 Conditions Must Be Met and at Least One Of The Other Two Tests Must Be Met To Extend Credit Credit Rating 1 Credit Rating 2 Last Years Sales

Customer Customer Customer Customer Customer

1 2 3 4 5

4.0 6.0 7.0 3.0 6.2

1.3 2.7 2.6 1.4 3.2

$1,043,462.00 $792,157.00 $831,594.00 $335,410.00 $490,000.00

Test: Credit Rating >= 6

no no yes no no

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

Test:

Credit Rating >= 6 OR Sales >= 500000

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

Extend Credit? NO CREDIT EXTEND CREDIT EXTEND CREDIT NO CREDIT NO CREDIT

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

No Test Passed

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

NO CREDIT EXTEND CREDIT EXTEND CREDIT NO CREDIT EXTEND CREDIT

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 ? LAB B Lab A LAB B Lab A EQUAL LAB B LAB B LAB B EQUAL LAB B

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 fail F F Student 2 67 fail D D Student 3 88 pass B B Student 4 70 pass C D Student 5 95 pass A A
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

7,123.26 5/19/2012 4/8/2013 324 498.63

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%

498.63

Name Apurva Khurana Tanvi Khurana Supriya Batra Ritika Raina

DOB Monday, October 02, 1989 Wednesday, September 18, 1985 Wednesday, July 20, 1983 Thursday, December 21, 1989

Das könnte Ihnen auch gefallen