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
- Split data in columns in Excelin the same data cell there are many different data types, you want to separate the data in the data cell according to its data type.
- Write italic, vertical, and diagonal lines in Excelwrite italic, vertical, and diagonal lines in excel - sometimes the data sheet you enter must write italics for titles to facilitate tracking.
- The function of dividing remainder and dividing by integer (MOD and QUOTIENT) in Excelcalculating data in excel spreadsheets, you will not be able to ignore division functions. divider functions are common and often used when division operations are needed. the function of dividing remainder and dividing by integer (mod and quotient) in excel
- Power function (exponential) in Excelpower function (exponential) in excel - power function is a power function of a number of bases with a given exponent, if you do not understand the syntax or how to use the power function, you follow the article write below.
- The Text function converts a numeric value into text in Excelin the process of working with excel, when the requirements of the job you need to convert from the number format to text format with the specified format suitable for the purpose of use. the text function will help you do that.
- Average function (calculate the average) in Excelthe average function in excel helps you calculate the average value for a range of numbers, an array, or a reference containing numbers quickly and accurately.