Excel Function

IF

Basic conditional branching function.

IF(logical_test, value_if_true, value_if_false)

Arguments

logical_test

Required

Enter a condition expression that returns TRUE/FALSE.

value_if_true

Required

Specify the value returned when the condition is TRUE.

value_if_false

Required

Specify the value returned when the condition is FALSE.

Practice Preview

Use IF to return "Pass" when cell C2 (Score in column C) is greater than or equal to 80; otherwise return "Fail".

Example Table

#
ALearner ID
BName
CScore
DResult
2U001Tanaka82
3U002Sato67
4U003Suzuki91
5U004Takahashi55
6U005Ito78
7
8

How to Use (Formula)

=IF(C2>=80, "Pass", "Fail")

Result

Pass

Practice This Function

IF FAQ

How do I use IF in Excel?

Enter the condition, the value for TRUE, and the value for FALSE in order. For example, to label scores above 80 as Pass, use IF(C2>=80, "Pass", "Fail").

Where can I practice IF?

Use the "Start Function Practice" button to jump straight into IF drills.

What arguments does IF use?

The main arguments are Logical test, Value if true, Value if false. Enter them in order.