Google Sheets Course: IF Function

The IF function will now have to check the person's age and display "Yes" or "No" depending on the result:

google sheets age test if function


To insert the function, enter =IF:

google sheets if function

After validating your choice, Google Sheets assists you by displaying useful information about the function:

google sheets if function

To display more information about the function, click on .

Firstly, you can notice that this function IF(logical_expression, value_if_true, value_if_false) requires 3 arguments (which are the elements to provide to the function), separated by a ,.

Now add the first requested argument, the test that will determine whether the person is of age or not, i.e., B2>=18 (value of cell B2 is greater than or equal to 18).

After adding the ,, the next argument is highlighted to let you know that you should now enter the value to return if the test is TRUE:

google sheets if function condition

Enter "Yes" for the value if TRUE, "No" for the value if FALSE and close the parenthesis:

google sheets if function condition age

Text values must be entered in "" in functions as is the case here with "Yes" and "No".

Press Enter then copy the formula:

google sheets if function copy

To get:

google sheets if function copied