The basic structure of the
IF THEN ELSE formula in Google sheets is an
IF formula with parameters, it looks like the following:
=IF(logical_expression; value_if_true; value_if_false)
NOTE: depending on your locale you may have to use comma (
,) instead of semicolon (
;) as separator for the parameters.
The first parameter is the expression that is evaluated to either be
FALSE, the second parameter is the value if the expression is
TRUE and the third parameter is the value if the expression is
For example the following will evaluate to
=IF(1=1; 1; 2)
and the following will evaluate to
=IF(1=2; 1; 2)
If the third parameter is missing the formula might output
FALSE if the expression is evaluated to false. For example the following will be
You can also use a cell as part of the formula:
In the above, if
A1 is bigger than
B1 then we select
That is all!
I hope you found this helpful, please leave a comment down below if you have questions!