The Purpose of the Google If ( ) Function

The If( ) function tests whether a certain condition in a cell is true or false.

If the condition is true, the function will carry out one operation.If the condition is false, the function will carry out a different operation.

The initial true or false test, as well as the follow up operations, are set with the function’s arguments.

The If( ) Function’s Syntax and Arguments

A function’s syntax refers to the format in which the function must be stated. It includes the function’s name, brackets, comma separators, and arguments. The syntax for the If( ) function is: The function’s three arguments are:

Test: a value or expression that is tested to see if it is true or false Then_true: the operation that is carried out if the test is true Otherwise_value: the operation that is carried out if the test is false

Example of the Google Sheets If( ) Function

In row 3, the If() function returns various results such as: This example:

Tests to see if the value in cell A2 is equal to 200 (the test argument)If it does, the function displays the value 1 in cell B3 (the then_true argument)If A1 does not equal 200, the function displays the value 2 in cell B3 (the optional otherwise_value argument)

How to Enter the If( ) Function

Unlike Excel, Google Sheets does not use dialog boxes for function arguments. Instead, it has an auto-suggest box that pops up as you type the name of the function into a cell. To enter the function: