Excel IF function — a result based on a condition

IF tests a condition and returns one value when it is true and another when it is false — for example "Plan met" when sales reach the target.

In other languages: EĞER (Türkçe), ЕСЛИ (Русский)

Syntax

IF(logical_test, value_if_true, [value_if_false])

Arguments

logical_test
The condition to test, e.g. B2>=100.
value_if_true
What to return when the condition is true (text goes in quotes).
value_if_false
What to return when it is false.

Example

Write "Plan met" for sales of 100 or more and "Below plan" otherwise.

AB
1EmployeeSales
2Aysel120
3Murad80
4Leyla150

Type the formula in C2

The formula in your Excel

  • English Excel=IF(B2>=100,"Plan met","Below plan")
  • Türkçe Excel=EĞER(B2>=100;"Plan met";"Below plan")
  • Русский Excel=ЕСЛИ(B2>=100;"Plan met";"Below plan")

"Plan met" for Aysel (120) and Leyla (150), "Below plan" for Murad (80). Type the formula in C2 and fill it down.

✨ Have the AI explain this formula

Useful tips

  • For several conditions use AND or OR: =IF(AND(B2>=100,C2="Baku"),"Yes","No").
  • For many levels (good / average / poor), nest IFs or use a small table with VLOOKUP.

Common errors

  • #NAME? — text typed without quotes: "Plan met" must be in quotes.