The powerful IF function

Beginner

In this exercise, we’re taking a look at one of the nicest functions in Excel: the If function. Why is it so nice? Well, because it allows you to add your own logic to your sheets. You’ll see what we mean in a second.

Here’s what the If function looks like:

=IF(Logical test, Value if true, Value if false)

What it does is it checks if the logical test is true. If it’s true, the cell will be filled with the value given as the second argument. In other cases, the cell will be filled with the value given as the third argument.

In this exercise, we would like to see if our students passed their tests. They pass if their score was higher than 60. This can be translated into a logical test that looks like: score > 60.

The scores are in the cells B2 up and until B6. Use the IF function with a logical test to output either “Pass” or “Fail” for each student. Good luck!

Need some help?

Hint 1

The logical test should look something like: B6 > 60

Hint 2

The complete function should look something like: =IF(B6 > 60, "TextPassed", "TextFailed") With TextPassed being the text that should be shown if the student passed and TextFailed being the text that should be shown if the student failed. Don't forget the quotes "" around texts!

Related function(s)

Exercise