Returns the logical value TRUE The TRUE Function[1] is categorized under Excel Logical functions. It will return the logical value of TRUE. The function is equivalent to using the Boolean value TRUE directly in a formula. In financial analysis, the TRUE function is often used with other logical functions such as IF, ERROR, etc. It is related to the FALSE function. Formula=TRUE() The TRUE function does not require a parameter or argument. How to use the TRUE Function in Excel?As a worksheet function, the TRUE function can be entered as part of a formula in a cell. To understand the uses of the function, let us consider a few examples: Example 1If we type =TRUE() in a cell, we get the result as TRUE. One can also enter TRUE function directly into a cell. Even if we do not add the parentheses, it will return the Boolean value TRUE. Example 2Now, let’s consider another example. Using the formulas below, the TRUE function will return the Boolean value TRUE. The data and formula used are: We get the results below: We can also enter the value TRUE directly into cells and formulas without using the function. For example: =IF(A1=1, TRUE) If the condition is met in this example, Excel returns TRUE. If the condition is not met, Excel returns FALSE. We can use either of the formulas: =IF(A1=1,TRUE()) or =IF(A1=1,TRUE) A few things to remember about the Function
=IF(B1<0, TRUE()) =IF(B1<0, TRUE)
Click here to download the sample Excel file Additional ResourcesThanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial analysis. To learn more, check out these additional CFI resources: Article Sources
The IF function allows you to make a logical comparison between a value and what you expect by testing for a condition and returning a result if that condition is True or False.
But what if you need to test multiple conditions, where let’s say all conditions need to be True or False (AND), or only one condition needs to be True or False (OR), or if you want to check if a condition does NOT meet your criteria? All 3 functions can be used on their own, but it’s much more common to see them paired with IF functions.
Use the IF function along with AND, OR and NOT to perform multiple evaluations if conditions are True or False. Syntax
Here are overviews of how to structure AND, OR and NOT functions individually. When you combine each one of them with an IF statement, they read like this:
Following are examples of some common nested IF(AND()), IF(OR()) and IF(NOT()) statements. The AND and OR functions can support up to 255 individual conditions, but it’s not good practice to use more than a few because complex, nested formulas can get very difficult to build, test and maintain. The NOT function only takes one condition. Here are the formulas spelled out according to their logic:
Note that all of the examples have a closing parenthesis after their respective conditions are entered. The remaining True/False arguments are then left as part of the outer IF statement. You can also substitute Text or Numeric values for the TRUE/FALSE values to be returned in the examples. Here are some examples of using AND, OR and NOT to evaluate dates. Here are the formulas spelled out according to their logic:
You can also use AND, OR and NOT to set Conditional Formatting criteria with the formula option. When you do this you can omit the IF function and use AND, OR and NOT on their own. From the Home tab, click Conditional Formatting > New Rule. Next, select the “Use a formula to determine which cells to format” option, enter your formula and apply the format of your choice. Using the earlier Dates example, here is what the formulas would be.
Note: A common error is to enter your formula into Conditional Formatting without the equals sign (=). If you do this you’ll see that the Conditional Formatting dialog will add the equals sign and quotes to the formula - ="OR(A4>B2,A4<B2+60)", so you’ll need to remove the quotes before the formula will respond properly. Top of Page You can always ask an expert in the Excel Tech Community or get support in the Answers community.
Learn how to use nested functions in a formula IF function AND function OR function NOT function Overview of formulas in Excel How to avoid broken formulas Detect errors in formulas Keyboard shortcuts in Excel Logical functions (reference) Excel functions (alphabetical) Excel functions (by category) |