SheetRocks
Documentation/Formulas/IFS

IFS

Returns the value corresponding to the first TRUE result when evaluating multiple tests.

Syntax

IFS(logical_test1, value1, [logical_test_n], [value_n])

Arguments

Argument Description Required
logical_test1 The first logical test to be evaluated. Required
value1 The value to return if first condition is true. Required
logical_test_n Additional logical test that will be evaluated if the first test is false. Optional
value_n Additional value to return if the first test is false. Optional

Examples

Grade assignment based on score

=IFS(A1>=90, "A", A1>=80, "B", A1>=70, "C", A1>=60, "D", true, "F")
Result ⇒ B
A
1 85

Categorize numbers as positive, negative, or zero

=IFS(A1>0, "Positive", A1<0, "Negative", A1=0, "Zero")
Result ⇒ Positive
A
1 15

Shipping cost based on weight

=IFS(A1<=1, 5, A1<=3, 10, A1<=5, 15, true, 25)
Result ⇒ 10
A
1 2.5

Related Functions

Other Logical functions:


← Back to Formula Reference