IF

Checks if condition holds TRUE or FALSE and fetches one value if condition is true and another if value is false.

Syntax of Excel If formula:
=IF(logical_test,[value_if_true],[value_if_false])

In words:
=Check if (this holds true, [then get this value], [otherwise get this value])

Example of Excel If formula

=IF(7=6,”Happy forever after”,””) As 7 is not equal to 6 therefore cell will remain empty as nothing is mentioned incase logical test returns FALSE.

=IF(H7=S6,7+6,7-6)
In this formula value in cell H7 is compared with the value in cell S6. If condition holds true then resultant will be 13. If condition fails then resultant will be 1.