Syntax
The syntax for the nesting the IF function is:
IF( condition1, value_if_true1, IF( condition2, value_if_true2, value_if_false2 ))
This would be equivalent to the following IF THEN ELSE statement:
IF condition1 THEN
value_if_true1
ELSEIF condition2 THEN
value_if_true2
ELSE
value_if_false2
END IF
Parameters or Arguments
condition
The value that you want to test.
value_if_true
The value that is returned if condition evaluates to TRUE.
value_if_false
The value that is return if condition evaluates to FALSE.
Note
This Nested IF function syntax demonstrates how to nest two IF functions. You can nest up to 7 IF functions.
References:
https://www.techonthenet.com/excel/formulas/if_nested.php
No comments:
Post a Comment