IF statement some equation
if(condition,true,false) [normal if statement]
EX:- In excel sheet, C4 has a value 5, Now we check that if the value is greater than 5 it show "value is greater than 5", else "value is lower than 5".
=if(C4>5,"value is greater than 5","value is lower than 5"), that is the actual form of if condition we apply on this work.
have a look at the image given below:
In this first image, we see that condition is true and it shows "value is greater than 5"
In this second image, we see that condition is false and it shows "value is lower than 5"
Nested If Condition
previous if statement, we can use only one condition.If we have multiple conditions to check what we have to do and how can we have done it by using if statement.
for multiple conditions, we use nested if.
syntax of nested if condition:
=if(condition,true,if(condition,true,if(condition,true,.........,0)))
Now we check it by an example, in this example, we check if someone result is "A" it
shows "Very Good", if "B" it shows "Good", if "C" it shows "Bad", Else 0.
The Actual Form of the if condition we use in this ,
=if(C4="A","Very Good",if(C4="B","Good",if(C4="C","Bad",0)))
have a look at the image given below:
Tag:
No comments:
Post a Comment