IF tests a condition and returns one of two results. Combine it with AND/OR for multiple conditions, or use IFS for many branches.
Do it with AI insteadWrite the logical test
Start with =IF(condition, e.g. =IF(B2>=60,
Set the true result
Add the value to return when true, e.g. "Pass".
Set the false result
Add the value when false and close, e.g. , "Fail").
=IF(B2>=60, "Pass", "Fail")Nest AND() or OR() in the test, e.g. =IF(AND(A2>0,B2>0), ...). For many outcomes, use IFS.
Nest a second IF in the last argument: =IF(A2>=90, "A", IF(A2>=70, "B", "C")).
Use two quotation marks as the last argument: =IF(A2>0, A2, "").
Combine IF with SEARCH: =IF(ISNUMBER(SEARCH("paid", A2)), "Yes", "No").