DESCRIPTION
The Microsoft Excel IF function returns one value if a condition is true and another value if is not.
SYNTAX
The syntax for the IF function in Microsoft Excel is:
IF(logical_test, value_if_true, [value_if_false])
PARAMETERS or ARGUMENTS
logical_test - The condition you want to test. You can use other logical functions within this argument, including AND, OR and XOR functions.
value_if_true - The value that you want to be returned if the result of logical_test is TRUE.
value_if_false - The value that you want to be returned if the result of logical_test is FALSE. This parameter is optional.
NOTE
You can put another IF function in IF function in the place of some of the arguments.
=IF(E2>=85,"A",IF(E2>=75,"B","C"))
EXAMPLES
Let's look at some Excel IF function examples and explore how to use it
The following IF examples would return:
=IF(A2>B2,"Over Budget","OK")
Result: Over Budget
=IF(A4=500,B4-A4,"")
Result: 425
=IF(A3>200, "Larger", "Smaller")
Result: Larger
=IF(A2=1500, "Equal", "Not Equal")
Result: Equal
No comments:
Post a Comment