Excel functions / Logical

IFS

Tests several conditions in order and returns the result for the first one that is true.

Syntax=IFS(test1, value1, [test2, value2], ...)

Arguments

test, value pairsEach condition followed by what to return if it is the first true one.

How it works

IFS replaces chains of IFs inside IFs. It checks each test in turn and stops at the first TRUE.

Order matters: put the strictest test first. Finish with TRUE and a value to catch everything else, otherwise unmatched rows show #N/A.

Example

E2=IFS(B2>=80,"A",B2>=60,"B",TRUE,"C")
ABCDE
1StudentScoreAttended
2Ana72YesB
3Ben45Yes
4Cal88No
5

Result: B. 72 is not 80 or more, but it is at least 60.

Tips

Practise IFS

Try it yourself in a real spreadsheet, with instant feedback on every answer.

Start the exercise

Related