Multiple if function - Usage and examples
If function is one of the most used functions in Excel, it helps you calculate values under many different conditions. The following article gives you a detailed guide on how to use the multiple if function with examples.
The if function is simplified in the sense that the function tests a value with a given condition, if it satisfies the condition that returns 1 value, if not satisfies returns another value.
1. Syntax: If (logical_test, Value if true, Value if false)
Inside:
- Logical_test: Conditional expression.
- Value if true: Value returned if the condition is true.
- Value if false: The value returned if the condition is false.
In some cases where a problem contains multiple conditions, you need to use the Or, And function to combine multiple conditions.
- The problem has many conditions, conditions occur simultaneously, you need to use the And function in the conditional expression. The syntax of the And function is: And (logical1, logical2, .)
- The problem has many conditions, the return value only needs to satisfy one of the conditions you use the Or function in the conditional expression. The syntax of the Or function: Or (logical1, logical2, .). Where logical is conditional expressions.
2. Usage and illustrative example.
Example 1: Using the If function contains only 1 condition to consider.
For example, given the result of entrance exam to grade 10 based on the results of the 3 subjects, if the total score is greater than 24, the student passes the exam, whereas the candidate fails the exam.
In a cell to calculate, enter the formula: = If (H7> 24, 'Do', 'Slide')
Press Enter and copy the formula for the remaining values to get the result:
Example 2: Similar to example 1 but the admission requirements if a student passes must achieve a total of 3 subjects greater than 18 points and no subject will score 0.
In a cell to calculate, enter the formula: = If (And (H7> 24, E7 <> 0, F7 <> 0, G7 <> 0), 'Do', 'Slide')
Press Enter and copy the formula for the remaining values to get the result:
As you can see, there are a number of candidates who have a total score greater than 18 but have 1 subject with a score of 0 so they are unfortunately eliminated.
Example 3: Rank student learning based on grade point average.
- If the average score is greater than or equal to 8.5 => good academic grade
- If the average score is greater than or equal to 6.5 and less than 8.5 => good academic performance
- If the average score is greater than or equal to 5 and less than 6.5 => average learning force.
- Left if the average is less than 5 => weak learning capacity.
In the cell to calculate, enter the formula: = IF (H7> = 8.5, "Good", IF (AND (H7> = 6.5, H7 <8.5), "Fair", IF (AND (H7> = 5, H7
Hit Enter Copy the formula for the remaining values to get the result:
Example 4:
There is a list of households engaged in animal husbandry and rearing of various types, filling in the type of farming that corresponds to the animal of the household.
For example:
- Households raising chickens or ducks are classified into livestock raising, households growing peanuts or bananas in a farming group, households raising shrimp or fish in groups of aquaculture groups.
There are 2 conditions and conditions here or should use the Or function. In the cell to enter the formula: = IF (OR (D7 = "x", E7 = "x"), "Crop", IF (OR (F7 = "x", G7 = "x"), "Blanket farming "," Aquaculture "))
Press Enter and Copy the formula for the remaining values to result:
The above is a detailed guide on how to use the multiple if function with illustrative examples. Good luck!
You should read it
- Function Address - The function returns the address of a cell in Excel (usage, examples, examples)
- PMT function in Excel - Usage and examples
- Excel date function - Usage and examples
- OR function in Excel, how to use the OR function, and examples
- FIND function in Excel - Usage and examples
- DCOUNT function in Excel - Usage and practical examples
- Match function in Excel - Usage and illustrative examples
- RANK function - Rank function in Excel - Usage and examples
May be interested
- ROUNDUP function in Excel - Usage and examplestoday, the software tips will guide you how to use the roundup function to round numbers (rounding up) in excel. roundup function structure function syntax: = roundup (number, num_digits). in which: + roundup: is the function name. + number: is the number to be rounded up. + num_digits: is the number of digits after the comma you want to round. for example:
- The map () function in Pythoncontinuing with the topic of built-in functions in python, the article will introduce you to the map () function with syntax, usage as well as specific examples. invites you to read the track.
- VLOOKUP function to use and specific examplesvlookup is one of the most useful excel functions but few understand it. in this article, we will help you understand vlookup with practical examples, such as grading students and staff using the vlookup function.
- DSUM function in Excel, how to use DSUM function and examplesdsum function in excel, how to use dsum function and examples. the dsum function in excel is a fairly common function with a fairly simple usage. but if you do not know how to use the dsum function, you can refer to the following article to understand h
- How to use the MAXA function in Excel, detailed examplesthe maxa function in excel helps find the largest value in a data set, including numbers, logical values, and text containing numbers. this is different from the max function, which only counts numbers. let's learn the syntax and usage of the maxa function with practical examples.
- The search function satisfies many conditions in Excel - Usage and examplesthe search function satisfies many conditions in excel - usage and examples. in the process of processing data in excel many times you need to search for data that satisfies many conditions to extract data, so you are looking for a function that satisfies many things.
- How to use the IF function with VLOOKUP (examples and how to)how to use the if function in combination with vlookup (examples and how to do it). if you are looking to use the if function with vlookup with specific examples, please refer to the following article. the following article will guide you 3 common cases using the if function
- DCount function in Excel - How to use the DCount function and examples using the DCount functiondcount function in excel - how to use the dcount function and examples using the dcount function you have a large list of students who want to get a high total score, but don't want to spend a lot of time. in this article, introduce to you the dcount function in excel. help c
- INDIRECT function in Excel - How to use INDIRECT function and examples using INDIRECT functionindirect function in excel - how to use indirect function and examples using indirect function. you want to refer to a range of data without changing the formula in the cell. the following article introduces you to the indirect function in excel to help you reference
- The function set () in Pythonin this article, tipsmake.com will learn with you about set (), syntax, parameters and specific examples. invites you to read the track.