This function allows you to test a logical statement and return one value if it’s true and another value if the statement is false.

 

Syntax

 

IF(Expression, Value if true, Value if false)

 

  • Expression (required) – This is the expression you want to test.
  • Value if true (required) – This is the result the function will return if the expression is true.
  • Value if false (optional) – This is the result the function will return if the expression is false. If nothing is entered here the function will return FALSE when the expression is false.

 

Example

 

In this example we use the formula IF(A2=”Donald Trump”,”Lame”,”Not Lame”). If the value in A2 is “Donald Trump” then the result is “Lame”, if it’s any other value the result is “Not Lame”.

 

IF-function IF function

 

[download id=”127″]