Arguments
logical_test- Any expression that evaluates to TRUE or FALSE, e.g. A1>100.value_if_true- What to return when the test is true.value_if_false- What to return when the test is false.
Returns one value when a condition is true and another when it is false.
Syntax
=IF(logical_test, value_if_true, value_if_false)logical_test - Any expression that evaluates to TRUE or FALSE, e.g. A1>100.value_if_true - What to return when the test is true.value_if_false - What to return when the test is false.=IF(A1>=50, "Pass", "Fail")Returns: "Pass" when A1 is 50 or more
The classic threshold test.
=IF(A1="", "", A1*1.2)Returns: Blank when A1 is empty, otherwise A1 × 1.2
Guarding against blank inputs keeps columns clean.
Yes. IF uses the same syntax in Google Sheets and LibreOffice Calc, so you can paste these formulas straight across.