# MONTEGO BAY HIGH SCHOOL INFORMATION TECHNOLOGY THE EXCEL IF FUNCTION.

## Presentation on theme: "MONTEGO BAY HIGH SCHOOL INFORMATION TECHNOLOGY THE EXCEL IF FUNCTION."— Presentation transcript:

MONTEGO BAY HIGH SCHOOL INFORMATION TECHNOLOGY THE EXCEL IF FUNCTION

OBJECTIVES Students should be able to.. 1 Design logical test conditions 2Use the If Function to manipulate figures in a spreadsheet

The IF Function The IF function is one of Excel’s most useful and most used functions. What it does, basically, is test to see whether a certain condition is true or false. If the condition is true, the function will do one thing, if the condition is false, the function will do something else.

The Syntax The basic form or syntax of the function is:syntax =IF(logic test, value if true, value if false)

The Logic Test Excel's logic functions always involve a comparison between two values. The logic test can only return a true or false answer, depending on the condition tested. The Comparison Operators The comparison operators that can be used in a logic test are: Equals ( = ) Less than ( ) Greater than or equal to ( > = ) Not equal to ( )

Logical Test Cont…. Examples The logic test can be a comparison between two cell references such as: A3 > B3 Or the logic test can be a comparison between a cell reference and a fixed amount such as: C4 < = 100

Performing calculations The IF function can perform different calculations depending on whether the function returns a true value or not..

Eg =IF(A4>=100,Value_if_true,Value_if_false) If The value in Cell A4 is > 100 or = to 100 (the logical test is true and Value_if_true will be displayed If the value in cell A4 is > 100 the logical test is false and value_if_false will be displayed.

The example below uses different deduction rates in its calculations based on employee income. =IF(A5 < 29701, A5 * 15%, A5 * 25%) The logical test is A5<29701 Value_if_true is A5 *15% Value_if_false is A5*25% Notice 1 0f two values will be displayed depending on wither the logical test is true or false.

=IF(A5 < 29701, A5 * 15%, A5 * 25%) If the value in cell A5 is less than or equal to 29701, the value in cell A5 will be multiplied by 15% (TRUE) If the value in cell A5 is greater than 29701, the value in cell A5 will be multiplied by 25% (False)

CALCULATING PAYE 1If an applicant earns \$5000.00 or less no PAYE is deducted. 2This base figure is called an income tax threshold. 3Income tax is calculated on the amount exceeding \$5000.00 4Therefore if an applicant’s salary is \$5100, PAYE is calculated on (5100-5000) or on 100. NOT \$5100.00.

Calculating PAYE cont…… 1Build a logical test, one that will determine wither the salary is equal to or less than \$5000.00 2Build an expression for value_if_true, that is an expression that will calculate the PAYE if it is equal to or less than \$5000.00 3Build an expression for value_if_false, that is an expression that will calculate the PAYE if the salary is greater than \$5000.00

Displaying non numeric values using the IF function. Non numeric values are placed in open and closed quotation marks. Eg =if(A4>=50, “Blue”,”Black”) If true the word Blue will be displayed If false the word Black will be displayed

Download ppt "MONTEGO BAY HIGH SCHOOL INFORMATION TECHNOLOGY THE EXCEL IF FUNCTION."

Similar presentations