

When we use the IFS function and give the formula =IFS(A2=”Apple”,”Fruit”,A2=”Banana”,”Fruit”,A2=”Spinach”,”Green Vegetable”,A2=”coffee”,”Beverage”,A2=”cabbage”,”Green Vegetable”,A2=”capsicum”,”Vegetable”) To understand the uses of this function, let’s consider a few more examples: Example 1 – Using IFS with ELSEĪssume we have a list of items and we need to classify them under four common headings: Vegetable, Fruit, Green Vegetable, and Beverage. We can use the IFS Function in the following manner: Let’s take a look at an example:Īssume we wish to assign grades to marks earned by students. It is a built-in function that can be used as a worksheet function in Excel. The function allows the user to put in up to 127 logical_test arguments using the IFS function. The rest of the logical_test and Value arguments are optional.

The IFS function checks if one or more than one conditions are observed or not and accordingly returns a value that meets the first TRUE condition. The function is an alternative to the Nested IF function and is much easier to use. IF() only calculates the value chosen - in this case 1/0 would give a #DIV/0! error, but is not calculated.The IFS Function in Excel is a Logical function that was introduced in Excel 2016. IF(1=2 1/0 SQRT(4)) returns 2, the square root of 4. IF(2>1) returns TRUE - because both value1 and value2 have been omitted and 2 is more than 1. IF(1>2 "nonsense") returns FALSE - because value2 has been omitted and 1 is not greater than 2. IF(A1>5 100 "too small") returns the number 100 if A1 is greater than 5, and the text "too small" otherwise. If value2 is omitted it is assumed to be FALSE if value1 is also omitted it is assumed to be TRUE.

value2 is the value that is returned by the function if test yields FALSE. Value1 is the value that is returned by the function if test yields TRUE. Test is or refers to a logical value or expression that returns a logical value ( TRUE or FALSE). Returns one of two values, depending on a test condition.
