Google Sheets IF Formula Builder (Nested IF & IFS)
Quick answer: To return different values by condition in Google Sheets, use =IF(A1>100,"High","Low") for one test, or stack conditions with =IFS(A1>100,"High",A1>50,"Medium",TRUE,"Low"). The builder above writes the full nested IF or IFS for you — quoting text, leaving numbers and cell refs raw, and adding the final else.
Writing nested IF statements by hand is where most Google Sheets formulas break — a missing comma or bracket and the whole thing fails. Enter each condition below and the exact formula is generated for you, in either classic nested IF or the cleaner IFS form.
Build your IF / IFS formula
Add each condition — the cell to test, how to compare it, and what to return. The exact Google Sheets formula is built as you type.
=IF(A1>100,"High","Low")
How the IF formula builder works
Google Sheets reads your conditions top to bottom and returns the result of the first one that is true. If none match, it returns the otherwise value you set.
Nested IF wraps each test inside the previous one: =IF(test1,result1,IF(test2,result2,else)). It works in every version and in older sheets, but gets hard to read past three conditions.
IFS lists condition/result pairs flat: =IFS(test1,result1,test2,result2,TRUE,else). The final TRUE,else is how you give IFS a default — without it, unmatched rows return #N/A. The builder adds it automatically.
Text results are wrapped in quotes, numbers and cell references are left raw, and the contains text operator is turned into ISNUMBER(SEARCH("text",cell)) so partial matches work.
Common ready-to-paste examples
Grade a score in A1 (over 90 = A, over 75 = B, else C):
=IFS(A1>90,"A",A1>75,"B",TRUE,"C")
Pass / fail on a mark in B2:
=IF(B2>=50,"Pass","Fail")
Label stock level from quantity in C2:
=IFS(C2=0,"Out of stock",C2<10,"Low",TRUE,"In stock")
Flag rows where column D contains the word "urgent":
=IF(ISNUMBER(SEARCH("urgent",D2)),"⚠️ Urgent","")
Commission tier from sales in E2:
=IFS(E2>=10000,E2*0.1,E2>=5000,E2*0.05,TRUE,0)
FAQ
When should I use IFS instead of nested IF in Google Sheets?
Use IFS when you have three or more conditions — it keeps them flat and readable instead of deeply nested brackets. Use nested IF for one or two conditions, or when you need it to run in tools that don't support IFS.
Why does my IFS formula return #N/A?
IFS returns #N/A when none of your conditions are true and you didn't set a default. Add a final TRUE, default pair (the builder does this automatically) so there is always a fallback result.
How do I check if a cell contains text in an IF formula?
Google Sheets has no "contains" operator, so you wrap it in ISNUMBER(SEARCH): =IF(ISNUMBER(SEARCH("word",A1)),"yes","no"). Pick the "contains text" option in the builder and it writes this for you.
Do I need to put quotes around results?
Text results need double quotes ("High"), but numbers, cell references like B2, and TRUE/FALSE should stay unquoted. The builder quotes text and leaves numbers and cell refs raw automatically.
How many conditions can nested IF handle?
Google Sheets allows up to about 7 nested levels in a single IF chain and no hard limit for IFS, but once you pass three or four conditions, IFS or a lookup table (VLOOKUP/XLOOKUP) is far easier to maintain.