Home › Functions › Logical › IF
fx
IF
Logical  ·  Since: Excel 2003  ·  9 languages

The IF function is one of the most popular functions in Excel, and it allows you to make logical comparisons between a value and what you expect.

🌐 Translations

English IF
Deutsch WENN
Français SI
Español SI
Italiano SE
Português SE
Nederlands ALS
Polski JEŻELI
Русский ЕСЛИ

📦 Availability

Excel versionAvailable
Excel 2007 ✓
Excel 2013 ✓
Excel 2019 ✓
Excel 2021 ✓
Microsoft 365 ✓
Translate a formula with this function
fx EN
fx DE

⌨ Syntax

IF(logical_test,value_if_true,[value_if_false])

Arguments

logical_test (required) — The condition you want to test.
value_if_true (required) — The value that you want returned if the result of logical_test is TRUE.
value_if_false (optional) — The value that you want returned if the result of logical_test is FALSE.

▶ Examples

=IF(C2="Yes",1,2)
=IF(C2>B2,C2-B2,0)
=IF(A2=B2,B4-A4,"")

Related functions

Copied to clipboard