IF()

Syntax. IF(logical_test,value_if_true,value_if_false)

Definition. This function checks a logical condition and performs the first action specified after the test argument if the condition is true and the second action if it is false.

Arguments

  • logical_test (required). Any value or expression that can be evaluated to TRUE or FALSE

    This argument can use any comparison operator:

    • Equal sign (=). You can directly compare the content of a cell with a number (A1=7), or you can compare two cells (A1=B1).

    • Greater than (>) or less than (<). You can directly compare the content of a cell with a number (A1>7 or B1<8), or you can compare two cells (A1>B1 or C1<D1).

    • Greater than or equal to (>=), less than or equal to, (<=), or not equal (<>). The not equal sign ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.