Home  >  Article  >  Software Tutorial  >  How to use ifs function in table

How to use ifs function in table

王林
王林forward
2024-03-20 20:46:17861browse

In Excel tables, the IF function is a commonly used logical judgment function, used to return different values ​​​​according to different conditions. When you need to fill the data in the table based on conditions, you can use the IF function to achieve this. Specifically, by entering the formula format "=IF (condition, result when the value is true, result when the value is false)" in the cell, you can fill in the corresponding value according to the condition. When using the IF function, you need to pay attention to the way the conditions are written and the logical relationship of the results to ensure the accuracy and logic of the table data.

1. Here we take the classic judgment of students' grades as "excellent", "good", "medium" and "poor" as an example to explain the advantages and usage of the ifs function.

How to use ifs function in table 

2. If we use the previous if function, we need to carefully organize our ideas, and three levels of nesting are needed to complete it. Enter "=IF(F2>90,"Excellent",IF(F2>70,"Good",IF(F2>=60,"Medium","Poor")))" in cell F2. Copy the fill formula downwards to get the result.

How to use ifs function in table 

3. If you use the ifs function, the logic of thinking and writing of formulas will be much simpler. Enter "= ifs(F2>90,"Excellent",F2>70,"Good",F2>=60,"Medium",TRUE,"Poor")" in cell F2, and copy the filled cells downward. got the answer.

How to use ifs function in table 

4. Pay attention to the writing order of the conditions here. If the order is reversed, incorrect results will occur. For example, if the above formula is written as "=ifs(F2>70,"Good",F2>90,"Excellent",F2>=60,"Medium",TRUE,"Poor")". Then when the F2 value is 94, the result is "good".

How to use ifs function in table 

5. Let’s talk about the ifs function syntax. ifs([condition1, value1, [condition2, value2,],…[condition127, value127,]). Up to 127 conditions can be entered.

How to use ifs function in table 

6. If there is no "TRUE" value in all conditions, #N/A error value will be returned. For example, in the above formula, the last condition is not "TRUE", but "F2>50". When the F2 value is 40, the #N/A error value will appear.

How to use ifs function in table 

The above is the detailed content of How to use ifs function in table. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:huke88.com. If there is any infringement, please contact admin@php.cn delete