“IF”
Used for – “IF” function in MS Excel is
used to check whether a condition is met or not, and returns with first value
if condition met, and the second value if condition does not met.
Syntax – IF(logical_test,
[value_if_true], [value_if_false]).
Logical _test – This is a criteria defined on the basis of what you want to take action. It can be a mathematical criteria or any logical function/criteria.
Value_if_true – This is the value you want see as a result when your said criteria is true. It can be a number/text/formula.
Value_if_false – This is the value you want see as a result when your said criteria is false. It can be a number/text/formula.
Logical _test – This is a criteria defined on the basis of what you want to take action. It can be a mathematical criteria or any logical function/criteria.
Value_if_true – This is the value you want see as a result when your said criteria is true. It can be a number/text/formula.
Value_if_false – This is the value you want see as a result when your said criteria is false. It can be a number/text/formula.
Example – Following example will clear
the IF function:-
A
|
B
|
C
|
D
|
E
|
F
|
G
|
H
|
I
|
|
1
|
12
|
10
|
=IF(A1<B1,”TRUE”,”FALSE”)
|
Greater
Value
|
=IF(A1<B1,B1,A1)
|
Lower
value
|
=IF(A1<B1,A1,B1)
|
||
2
|
18
|
15
|
=IF(A2>B2,”TRUE”,”FALSE”)
|
Greater
Value
|
=IF(A2>B2,A2,B2)
|
Lower
value
|
=IF(A2>B2,B2,A2)
|
||
3
|
25
|
=IF(A3<20,”TRUE”,”FALSE”)
|
=IF(A3>20,”TRUE”,”FALSE”)
|
||||||
4
|
|||||||||
5
|
|||||||||
6
|
|||||||||
7
|
And
result you get as under:-
A
|
B
|
C
|
D
|
E
|
F
|
G
|
H
|
I
|
|
1
|
12
|
10
|
FALSE
|
Greater
Value
|
12
|
Lower
Value
|
10
|
||
2
|
18
|
15
|
TRUE
|
Greater
Value
|
18
|
Lower
Value
|
15
|
||
3
|
25
|
FALSE
|
TRUE
|
||||||
4
|
|||||||||
5
|
|||||||||
6
|
|||||||||
7
|
Note:-
The IF Function can be used to tell excel which operations is to be done or
which result to be shown depending upon the criteria you have mentioned.
Dear readers, after reading the Content please ask for advice and to provide constructive feedback Please Write Relevant Comment with Polite Language.Your comments inspired me to continue blogging. Your opinion much more valuable to me. Thank you.