top of page

IF FUNCTION

Utilize the IF function to verify if a specific condition or set of conditions is satisfied. When the condition is met, the function will produce a predetermined outcome. Conversely, if the condition is not met, a different predefined outcome will be generated.

The resulting outcome can take various forms, such as:

  • A specific text

  • A reference to a cell or range

  • An additional formula, known as a "Nested IF," where we can include another formula within the IF function.

The syntax of the IF function is structured as follows: =IF(logical test,[value if true],[value if false])

  1. Logical test: This represents the condition we wish to evaluate. We can employ various operations like equals ("="), greater than (">"), less than ("<"), or not equal to ("<>"). For instance, if we want to check if Cell A2 is greater than Cell A1, we would express it as: A2>A1.

  2. Value if true: This indicates the outcome the function will return if the condition is met.

  3. Value if false: This signifies the outcome the function will return if the condition is not met. If left empty, the function will yield "FALSE" as the default result.

Suppose we desire to check if A2 is greater than A1 and return "A2 is greater" if true, or "A2 is not greater" if false. The formula would be:

=IF(A2>A1, "A2 is greater", "A2 is not greater")

bottom of page