IF function (1)
IF function (1)
Purpose: the IF function automatically enters data (i.e. a word or a number) into a cell
depending on a content of another cell.
Example:
Below is a spreadsheet of students and their marks. In column C, the IF function
is used to automatically enter the words PASS or FAIL, depending on the student’s
mark.
There are 3 parts to the IF function: the test condition, a True result and a False result.
=IF(B3>=50,"PASS","FAIL")
The way to read the IF function is to say: if B3 is greater than or equal to 50, then enter
PASS, otherwise enter FAIL.
Examples of IF statements:
4. =IF(D4=”staff”, 11.55 , 0)
If D4 contains the word “staff” (spelled exactly that way), then the output is 11.55.
Otherwise, a zero is entered. Note that words must be within quotation marks.
6. =IF(G3=”bonus”, B24*2, 0)
If G3 says “bonus”, then it calculates the amount of bonus. Otherwise, a zero is entered
for the amount of bonus.
YOUR TURN!
TASK: Create your own IF function. You may work in pairs if you wish. Submit your
table in the drop box: IF function.