IFS
Returns the first matching condition from a list of conditions and corresponding results.
Syntax
=IFS(condition1, result1)
=IFS(condition1, result1, condition2, result2, ..., conditionN, resultN)
Arguments
Argument | Type | Description |
---|---|---|
condition | Boolean | The conditions to check |
result | Any | The result for the corresponding condition |
Examples
=IFS(0 = 1, "A", 0 = 2, "B", true, "C")
→ "C"
Check if 0 is equal to 1 (and returns "A" if so), then if 0 is equal to 2 (and returns "B" if so), then if true is true (and returns "C" if so). Because true is true by definition, the function returns "C".
=IFS(@"Property 6" > 10, "10+", @"Property 6" > 0, "0+")
→ "0+"
Checks if the shape data property "Property 6" is greater than 10 (and returns "10+" if so), then if "Property 6" is greater than 0 (and returns "0+" if so). Because "Property 6" (8) is not greater than 10, it does not return "10+"; however, it is greater than 0, so the function returns "0+".
Updated 7 months ago