
Excel IF Function
Use:
- Evaluates any T/F comparison, then executes either a true-action or a false-action. The
true and false actions can be as simple as a constant or as complex as another entire
Excel formula.
Syntax:
- IF( test , true-action , false-action )
Examples:
- Cell D4 formula: IF( C4=MAX( C3:C9 ) , "Yes" , "No" )
Cell E4 formula: IF( C4>=0.75*MAX( C3:C9 ) , C4/MAX( C3:C9 ) , ""
)
Note:
- The true and false actions can be any Excel formula. It is referred to as a nested IF function when either the true or false action is another
IF function. Nested IFs can be handy, but very awkward if too many levels of nesting are
used. The HLOOKUP, VLOOKUP and CHOOSE functions are often used in place of nested IFs.
Related Functions:
- AND, OR, HLOOKUP, VLOOKUP, CHOOSE