How to use the IFS function in Excel 2016
What is the IFS function?
The IFS function in Excel is a logical function introduced in Excel 2016. This function is a function that replaces the nested IF function and is much easier to use. The IFS function checks one or more conditions and returns a value that meets the first TRUE condition.
Recipe
= IFS (logical_test1, Value1 [logical_test2, Value2] ., [logical_test127, Value127])
Inside:
- Logical_test1 checks the logic condition first. It is a required argument and is a condition used by Excel to evaluate either TRUE or FALSE.
- Value1 is the result when logical_test1 is TRUE. If necessary, you can set it blank.
The rest of the logical_test and Value arguments are optional. The function allows users to use logical_test 127 arguments.
How to use the IFS function in Excel
This is a built-in function that can be used as a function in an Excel worksheet. Let's take an example:
Suppose we want to classify points A, B, C, D, E, and F according to the student scores achieved, we use the IFS function as follows:
= IFS (A2> 80, "A", A2> 70, "B", A2> 60, "C", A2> 50, "D", A2> 40, "E", A2> 30, "F" )
Specifically in this function set if A2 is greater than 80, the result returned is point A, if A2 is greater than 70 the result is returned as B, and so on to point F.
Using this formula we will have the following result:
Example of IFS function in Excel
To understand how to use this function, let's look at a few examples:
Example 1 - Using IFS with ELSE
Suppose there is a list of items and need to classify them into groups of plates: Vegetable, Fruit, Green Vegetable and Beverage. When using the IFS function, you will have the following formula:
= IFS (A2 = "Apple", "Fruit", A2 = "Banana", "Fruit", A2 = "Spinach", "Green Vegetable", A2 = "coffee", "Beverage", A2 = "cabbage", "Green Vegetable", A2 = "capsicum", "Vegetable")
After that, we will get the following result:
In this example, we have set the logic condition in the IFS function. When a logical condition evaluates to TRUE, the corresponding value will be returned. However, if there is no logical condition evaluated as TRUE, IFS function will issue a # N / A error. As in this example is Pepper in cell B8.
To prevent the # N / A error from appearing, we can use the ELSE function. Therefore we can set the final logic condition in the formula to TRUE and then set a return value.
Here, we have added TRUE, "Misc", to ensure that Excel returns the "Misc" value in case no previous logical condition in the IFS function is evaluated as TRUE.
Now the result will be as follows:
Example 2 - IFS vs IF nested function
Before IFS functions, we often use nested IF functions. Let's see how IFS function is more efficient than nested IF function. Suppose a store makes a discount for customers based on their total purchase bill. Therefore, customers will receive a 5% discount for bills from USD 100 to USD 500, a 10% discount for bills from USD 500 to USD 750, a 20% discount for the total amount of USD 750 to USD 1,000 and a 30% discount when customers buy over 1000 USD.
Here is the formula when using the nested IF function:
Now let's see what happens if IFS uses the function:
As you can see, the IFS function is easier to use because you only have to use a single function to enter a variety of logical conditions, while the nested IF function must use multiple logical conditions and is easy to confuse while write function.
Some errors occur when using the IFS function
1. Error # N / A occurs when no TRUE condition is found in the IFS function.
2. #VALUE! Error occurs when the logical_test argument processes into a value other than TRUE or FALSE.
3. Error message "You've entered too few arguments for this function" appears when you provide argument logical_test without the corresponding value.
I wish you all success!
See more:
- How to use the SWITCH function in Excel 2016
- How to use the TEXTJOIN function in Excel 2016
- These are the most basic functions in Excel that you need to understand
You should read it
- Save time with these text formatting functions in Microsoft Excel
- How to use Excel's VALUE function
- Differentiate between SUM, SUMIF, SUMIFS and DSUM functions
- How to use Hlookup function on Excel
- Instructions on how to use the Dmax function in Excel
- How to use the SWITCH function in Excel 2016
- How to use MID functions to get strings in Excel
- Instructions for using Index function in Excel
May be interested
- How to use the WRAPROWS function in Excelhaving trouble with handling large data sets in excel? then learn how to use the wraprows function to split them into more manageable rows.
- How to use the NPER function in Excel to plan loans and savingsdo you want to effectively manage and control your personal finances? then we invite you to learn how to use excel's nper function.
- How to use the function to delete spaces in Exceldeleting white space with functions in excel makes it easier for users to handle content, instead of traditional editing.
- How to fix the SUM function doesn't add up in Excelin the process of summing with sum in excel, you will encounter some errors such as not jumping the number, not adding the sum. so how to handle this problem?
- How to use the SUBTOTAL function in Excelthe subtotal function in excel is used in many different cases, helping you to sum subtotals in a list or database, unlike the sum function in excel such as counting cells, calculating average, finding the largest / smallest value. or sum the filtered list values in excel
- Save time with these text formatting functions in Microsoft Excelmicrosoft excel is a main application for anyone who has to work with numbers, from students to accountants. but its usefulness extends beyond a large database, it can do a lot of great things with text. the functions listed below will help you analyze, edit, convert, change text and save many hours of boring and repetitive tasks.
- SUMPRODUCT function in Excel: Calculates the sum of corresponding valuesthe sumproduct function is an extremely useful function when you have to deal with a lot of data numbers in microsoft excel. here are the things you need to know about the sumproduct function in excel.
- How to use the SUMIF function in Excelthe sumif function in excel is a function used to compute values in a specified range. the sumif function can be used for summing cells based on the date, data and text that are connected to the specified area.
- How to use the DAVERAGE function in Exceldaverage in excel is a function that calculates the average value of data with given conditions in a spreadsheet. so, how to use this function?
- How to use the kernel function (PRODUCT function) in Excelin excel, product helps users to calculate product values, multiply arguments together, and return their results correctly.