Skip to main content
📌 More functions: see the Formula function reference.

1 Basics

IF and IFS are common AI Table logical functions — return different values or take different actions based on conditions.

IF

IF lets you specify a condition and return different results based on whether it’s true. It’s one of the most basic logical tools in spreadsheets.

Syntax

IF(condition, [if_true], [if_false])
  • condition: the logical expression to test.
  • if_true: value to return when the condition is true.
  • if_false: value to return when the condition is false.

Example

[Field 1] in the first record is 50.
Example 1: is [Field 1] > 30?
=IF([Field 1] > 30, "Pass", "Fail")
Result: “Pass” (50 > 30).

IFS

IFS is an extension of IF — test multiple conditions and return the first match. Cleaner than nested IFs.

Syntax

IFS(condition1, value1, condition2, value2, ..., [default])
  • condition1, condition2, …: a series of logical expressions to test.
  • value1, value2, …: values to return when the corresponding condition is true.
  • default (optional): value to return when no condition matches.

Example

[Field 1] in the first record is 75.
Example 1: grade by score range
=IFS([Field 1] >= 90, "Excellent", [Field 1] >= 70, "Good", [Field 1] >= 60, "Pass", TRUE, "Fail")
Result: “Good” (75 matches the second condition). With IF and IFS, you can build complex logical decisions and data handling — fits a wide range of business needs.

2 FAQ

  • Q: Why does an IFS() formula have no syntax error but return #N/A? A: When the input doesn’t match any condition in IFS(), it returns #N/A. Add a fallback at the end. Example: IFS([Score]=100,“Full marks”, [Score] >=85,“Excellent”, [Score] >=75,“Good”, [Score] >=60,“Pass”, TRUE,“Fail”) — here TRUE,“Fail” is the fallback. Anything that misses the earlier conditions falls into “Fail”.