IF function in Excel
IF function is a common function in Excel, for those who often work with Excel spreadsheets, almost everyone knows the IF function. But for those of you who are new to Excel, you may know the IF function but not the function.
The following article describes the syntax and usage of the IF function in Excel, you follow along.
Description
The If function returns the value if the condition is evaluated as TRUE and will return another value if the condition is evaluated as FALSE.
Syntax
IF (logical_test, [value_if_true], [value_if_false])
Inside:
- logical_test: an expression that can be TRUE or FALSE.
- value_if_true: the value you want to return if the logical_test argument value is TRUE.
- value_if_false: the value you want to return if the logical_test argument evaluates to FALSE.
You can nest if functions as value_if_true or value_if_false with complex requests.
For example
Example 1: Using an IF function
Give the data table as follows:
Requirement: If the number of products sold> = 30, the result "Satisfactory" will be returned, if the number of products sold
You check the conditions for the first employee to apply the formula:
= IF (E6> = 30, "Pass target", "Not met")
E6 is the number of products sold by the first employee, if the number of products sold> = 30, the result will be "Pass the target", the opposite result is "Not reached".
The following results:
You do the same with the other employees, but cell E6 is replaced respectively E7 of the second employee, E8 of the third employee .
Example 2: Using nested IF functions
For the data table as in example 1:
Requirements: If the number of products sold> = 30, the result is Satisfactory, and if the number of products sold> 20, the result is Failed, otherwise the result is Type.
Apply the formula to the first employee:
= IF (E6> = 30, "Pass quota", IF (E6 <= 20, "Type", "Not met")
The following results:
Do the same, the staff below will replace E6 with E7, E8 . and you will get the results of all other employees.
Thus, the article introduces you to the IF function syntax and specific examples of how to use the IF function. Hopefully, with the 2 examples above, you can grasp how to use the IF function in Excel. Good luck!
You should read it
- How to use the SUM function to calculate totals in Excel
- How to use the LEN function in Excel
- How to use COUNTIF function on Excel
- How to use the MOD function and QUOTIENT function in Excel
- How to use MID functions to get strings in Excel
- How to use Excel's VALUE function
- How to use the WRAPROWS function in Excel
- How to use the IFS function in Excel 2016
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 IFS function in Excel 2016the 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.
- 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?