TRUE()

Syntax. TRUE()

Definition. This function returns the logical value TRUE.

Arguments. None

Background. This function is seldom used because you can just enter the word true. Excel interprets the result returned by the function as a logical value (in this case, TRUE). The interpretation forced by numeric operations is the number value 1. You can check this by entering the formula =3+TRUE in a cell.

However, if you compare two cells, and one cell contains TRUE and the other cell contains 1, the result is FALSE.

Note

You can enter true (which is not case-sensitive) directly in a worksheet or formula. Excel recognizes this word as the logical value TRUE and formats the cell accordingly. To avoid this, do one of the following:

  • Format the cell as text before you enter true (click Cells/Format/Format Cells on the Home tab in Excel 2007 or Excel 2010, and Format/Cells in earlier versions).

  • Enter a space before the word true.

  • Prefix the text with an apostrophe (‘).

Excel recognizes TRUE as a logical value even if you don’t enter the parentheses. This is different from other functions; for example, the function TODAY() generates an error when the parentheses are missing.

Logical values can be useful when you are evaluating expressions using the logical operators AND and OR:

  • The OR operator for two logical values is always TRUE unless both logical values are FALSE.

  • The AND operator for two logical values is always FALSE unless both logical values are TRUE.

The second example for the FALSE() function illustrates how you can use logical values instead of the functions.

See Also

AND(), FALSE(), NOT(), OR()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.97.75