All Posts

Google Sheets IF Formula: Complete Guide with Examples

2026-03-18

Basic IF Formula

The IF function tests a condition and returns one value if true, another if false:

=IF(A2>=60, "Pass", "Fail")

Nested IF (Multiple Conditions)

Assign letter grades based on score ranges:

=IF(A2>=90,"A",IF(A2>=80,"B",IF(A2>=70,"C",IF(A2>=60,"D","F"))))

IF with AND (All Conditions Must Be True)

Check if both conditions are met before approving:

=IF(AND(B2>1000, C2="Verified"), "Approved", "Pending")

IF with OR (Any Condition Can Be True)

Flag priority items from multiple sources:

=IF(OR(D2="Urgent", E2>100), "Priority", "Normal")

IFS (Cleaner Alternative to Nested IF)

IFS evaluates multiple conditions in order and returns the first match:

=IFS(A2>=90,"A", A2>=80,"B", A2>=70,"C", A2>=60,"D", TRUE,"F")

Generate formulas instantly

Describe what you need in plain English. Get the formula for Excel, Google Sheets, or Airtable.

Try FormulaWiz Free