NESTED IF
Use of Nested IF unction in Excel
We can nest multiple IF function in on one excel formula.
This function we use when we have multiple logical condition to meet.
Syntax / Formula of Nested IF function:
The syntax of Nested IF function in Microsoft Excel is below
=IF(logical_test,[value_if_true],IF(logical_test,[value_if_true],IF(logical_test,[value_if_true],[value_if_false])))
Logical Operators
We can use any of the following Logical Operators:
Symbol of Operators | Meaning |
= | Equal to |
> | Greater Than |
>= | Greater Than or Equal to |
< | Less Than |
<= | Less Than or Equal to |
<> | Not Equal to |
Example of Nested in function in Excel
In this example student grade is based on below criteria
Total Marks Score 0 to less than 140 then grade is F
Total Marks Score 140 to less than 190 then grade is E
Total Marks Score 190 to less than 240 then grade is D
Total Marks Score 240 to less than 290 then grade is C
Total Marks Score 290 to less than 340 then grade is B
Total Marks Score 340 to 400 then grade is A
Step 1: First create below table in your excel starting from cell range A1:D11
Step 2: Type formula =IF(C2<140,"F",IF(C2<190,"E",IF(C2<240,"D",IF(C2<290,"C",IF(C2<340,"B","A"))))) in cell D2 and press enter.
In this formula C2<140, C2<190, C2<240, C2<290, C2<340 is our logical_test
[value_if_true] is "F", "E", "D", "C","B"
[value_if_false] is "A"
NESTED IF FUNCTION |
No comments:
Post a Comment