## Syntax

IF(logical_test, [value_if_true], [value_if_false])

**logical_test**(Required): Any value or expression that can be calculated to give TRUE or FALSE answer.**value_if_true**(Optional): Value or calculation that you want to be returned when theargument evaluates to TRUE. For instance, if the value of this argument is "Under 50" and the*logical_test*argument evaluates to TRUE, the*logical_test***IF**formula returns the text "Under 50". Whencalculates to TRUE and the*logical_test*argument is not provided*value_if_true***IF**formula will return 0.**value_if_false**(Optional): The value or calculation that you want to be returned if theargument calculates to FALSE. For instance, if the value of this argument is the text string "Over 50" and the*logical_test*argument calculates to FALSE, the*logical_test***IF**formulas returns the text "Over 50". As above, if**value_if_false**is not provided**IF**formulas will return 0.

## Notes

- Up to 64
**IF**formulas can be written asand*value_if_true*arguments to create more comprehensive tests. Otherwise, to assess multiple conditions, you might consider using the LOOKUP, VLOOKUP, HLOOKUP, or CHOOSE functions.*value_if_false* - If any of the arguments to
**IF**formula are arrays, every element of the array is evaluated when the**IF**statement is calculated. - Excel provides many other formulas that can be used to analyze your data based on a condition. For instance, to count the number of occurrences of a series of text or a number within a range of cells, use the COUNTIF or the COUNTIFS excel formulas. To calculate a Total based on a series of text or a number within a range, use the SUMIF or the SUMIFS.
- Equals (=), Less than (<), Less than or equal to (<=), Greater than (>), Greater than or equal to (>=), Not equal to (<>).