🟩 Sheet Formulas

IF Function in Google Sheets

Use IF to return one thing when a condition is true and another when it is false — flag overdue rows, label pass/fail, or leave a cell blank.

=IF(A2>100, "High", "Low")

If A2 is greater than 100 it shows "High", otherwise "Low". Text results go in quotes.

How it works

IF takes three parts: a logical test, the value to return if it is true, and the value if it is false. The test can use comparison operators (=, >, <, >=, <>) or any function that returns TRUE/FALSE. Nest more IFs in the false slot to test several cases, or use IFS for cleaner multi-condition logic.

Variations

Blank if the cell is empty

=IF(A2="", "", A2*1.2)

Returns an empty string when A2 is empty instead of an error or 0.

Two conditions must both hold (AND)

=IF(AND(A2>100, B2="Paid"), "OK", "Review")

AND is true only when every condition inside is true.

Either condition is enough (OR)

=IF(OR(A2="VIP", B2>1000), "Priority", "Normal")

OR is true when at least one condition is true.

Nested IF for three outcomes

=IF(A2>=90, "A", IF(A2>=80, "B", "C"))

Checks the next condition only when the previous one is false.

Examples

ScenarioFormula
Pass/fail on a score=IF(A2>=60, "Pass", "Fail")
Flag overdue by date=IF(A2<TODAY(), "Overdue", "")
Discount only over a threshold=IF(A2>500, A2*0.9, A2)

FAQ

What is the difference between IF and IFS?

IF handles one true/false test with two outcomes. IFS lets you list many conditions and results without nesting IFs inside each other.

How do I check two conditions in one IF?

Wrap them in AND(...) when both must be true, or OR(...) when any one is enough: =IF(AND(A2>0, B2>0), "yes", "no").

How do I return a blank cell from IF?

Return an empty string with two quotes: =IF(condition, "", value).

Related formulas