Error
  • JUser: :_load: Unable to load user with ID: 855

IF Excel function

Written by 

IF Excel formula calculates your condition and will do one thing if it is correct (TRUE) or different thing if it is incorrect (FALSE). For instance, the formula =IF(A1<50, “Under 50”, “Over 50”) will return “Under 50” if A1 cell has any number below 50 and “Over 50” if number is over 50.

This is simple explanation, but wait till it can get more complex (and more handy?) ...

 

Syntax

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

The IF function syntax has the following arguments:

  • 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 the logical_test argument evaluates to TRUE. For instance, if the value of this argument is "Under 50" and the logical_test argument evaluates to TRUE, the IF formula returns the text "Under 50". When logical_test calculates to TRUE and the value_if_true argument is not provided IF formula will return 0.
  • value_if_false (Optional): The value or calculation that you want to be returned if the logical_test argument 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 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 as value_if_true and value_if_false arguments to create more comprehensive tests. Otherwise, to assess multiple conditions, you might consider using the LOOKUP, VLOOKUP, HLOOKUP, or CHOOSE functions.
  • 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 (<>).

Example

IF - Excel Formulas

Download IF Example

More in this category: « NOT FALSE »