IF() — Checking conditions

The IF() function is one of the most used in Excel. It’s very simple to use. The syntax for this function is:

IF(logical_test,value_if_true,value_if_false)

logical_test is the value or expression that we want to evaluate. value_if_true is the result if the condition of logical_test is true and value_if_false is the result if the condition is false.

Examples:

=IF(A2=100,"True","False") will check if there is a value 100 in cell A2. If true, will put on the cell where we have the formula, the value “True”. If the value in cell A2 it’s not 100 the formula will return “False” on the cell.

=IF(AND(A2=100,A3=200),"True","False") this is the same as the last example with the exception that in this case we are checking two condition and only if both are true, the result will be “True”.