IF

Returns one result if a test is true, and another if it isn’t.

How it’s written

IF(test, if_true, if_false)

Example

AB
1NameScore
2Amara72
3Ben90
4Chloe65
5Dev90
6Elena83
=IF(B2>=70,"Pass","Fail")

Result: Pass

Amara’s 72 is at least 70, so the result is Pass.

Try it yourself

Open a live sheet with this example, and type the formula yourself. It takes a moment to load.

Worth knowing

Keep thresholds like 70 in their own cell, so they’re easy to change.

Practice it properly

Making decisions with IF gives you real tasks, with your formulas tested on data you haven’t seen.

Start the lesson

Related functions