The IF Function Syntax
A function’s arguments refer to all the data or information required by a function. These arguments must be entered in the correct order. As an example, the syntax of the IF function in Excel is:
Parenthesis and Commas
In addition to the order of arguments, the term syntax also refers to the placement of round brackets or parenthesis surrounding the arguments and to the use of the comma as a separator between the individual arguments.
Reading the IF Function’s Syntax
The IF function in Excel and in Google Sheets has three arguments arranged in the following order:
Logical_test argumentValue_if_true argumentValue_if_false argument
If the arguments are placed in a different order, the function returns an error message or an unexpected answer.
Required vs. Optional Arguments
One piece of information that the syntax does not relate is whether an argument is required or optional. In the case of the IF function, the first and second arguments (the Logical_test and the Value_if_true arguments) are required. The third argument, the Value_if_false argument, is optional.
If the third argument is omitted from the function and the condition tested by the function’s Logical_test argument evaluates to false, then the function displays the term FALSE in the cell where the function is located.