IFS

Formulas / IFS
Evaluates multiple conditions and returns the first result that is TRUE
==IFS(logical_test1, value_if_true1, [logical_test2, value_if_true2], [logical_test3, value_if_true3],…)
  • logical_test1 - a condition that returns TRUE or FALSE
  • value_if_true1 - a value to be returned if logical_test1 evaluates to TRUE
  • logical_test2...logical_test127 - [OPTIONAL] conditions that return TRUE or FALSE
  • value_if_true2...value_if_true127 - [OPTIONAL] values to be returned if logical_testN is TRUE

Examples

  • =IFS(C5<60,"F",C5<70,"D",C5<80,"C",C5<90,"B",C5>=90,"A")

    The IFSfunction is a useful tool for creating a logical test based on a set of conditions. In this example, the IFSfunction is used to return letter grades based on a score in cell C5. If the score in cell C5 is less than 60, the function returns an "F". If the score is between 60 and 70, it returns a "D", and so on.

  • =IFS(A1>=3,"Good",A1>=2,"Average",A1<2,"Poor")

    The IFS function can also be used to return ratings based on a score. In this example, the IFS function is used to return ratings for a score in cell A1. If the score in cell A1 is greater than or equal to 3, the function returns "Good". If the score is between 2 and 3, it returns "Average", and if it is less than 2, it returns "Poor".


Summary

The IFS function is a powerful tool for evaluating conditions in Sourcetable. It can be used to test up to 127 different conditions, making it a great alternative to using multiple IF statements.

  • The IFS function evaluates multiple conditions up to 127, each of which must be a logical test that is either TRUE or FALSE.
  • The IFS function returns a value based on the first TRUE result, and may return a default value if the last test is set to TRUE.
  • The IFS function is newly available in Excel 365 and Excel 2019.
  • The IFS function throws a #VALUE! error if a logical test does not evaluate to TRUE or FALSE.

Frequently Asked Questions

What does the IFS function do?
The IFS function performs a similar function to the IF statement. It allows multiple logical tests to be used and returns a value based on the first logical test that is true.
How many conditions can the IFS function test?
The IFS function can test up to 127 different conditions.
What is the order that the IFS function tests conditions?
The IFS function tests conditions based on the order they are entered and returns the value corresponding to the first logical test that passes.
Is the IFS function easy to use?
The IFS function is easier to read than multiple IF statements, but it can be difficult to build, update, and test when it takes too many conditions.
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV