How to Use TRUE Function in Excel (With 10 Examples)

The TRUE function has a special type of compatibility in returning results based on logical conditions.

In this article, I’ll discuss the ins and outs of the TRUE function including real-life examples with proper explanations. So that you may adjust the formula for your uses.

TRUE Function in Excel (Quick View)

TRUE Function in Excel (Quick View)

Download Excel Workbook

Excel TRUE Function: Syntax & Arguments

Firstly, we’ll see the syntax and argument of the function. If you insert the function after entering equal sign (=), you’ll see the following figure.

TRUE Formula

Summary

The TRUE function is a compatibility function (also called logical function or conditional function) that returns the logical value TRUE. It is mainly equivalent to the Boolean value TRUE which works based on a condition.

Syntax

=TRUE ()

Return Values

TRUE (a logical value)

Arguments

No arguments

How to Use the TRUE Function in Excel (Examples)

Example 1: TRUE Function As A Value

The TRUE function acts as a logical value in Excel. So that you can use the function in calculations. The numerical value of TRUE is 1 during calculations. See the following screenshot.

TRUE Function As A Value

Example 2: TRUE As A Boolean Function

A boolean variable can have one of two possible values. One possible value for a binary variable is 0 (false), while the other is 1.

The TRUE function returns the value 1 while acting as a boolean function in Excel.

There are various types of expressions in the following figure. As the input is inserted with the logical operator, the result shows TRUE if the logic is actual. Otherwise, FALSE is shown.

TRUE As A Boolean Function

Let’s think about a little bit complex example like the following.

For example, the product names with their price are given. Also, a criterion is provided that you have to find the discount for all products based on a discount of 15% for the price greater than $250.

If the logical statement says the price is greater than $250, the result will be TRUE, and also the TRUE will be replaced by the given percentage of 15%.

For this, use the following formula.

=IF(C5>$G$9,$H$9,$H$8)

TRUE As A Boolean Function

Example 3: Finding Greater or Less Than Value from A Given Value

You can easily find the greater than or less than the value from a specific value.

Suppose, the standard price is given as $200. Now you have to check whether the value is greater than $200 or not.

=IF(C5>200,TRUE)

Finding Greater or Less Than Value from A Given Value

Example 4: Finding Equal Cell Value

Let’s imagine you have two prices e.g. prices in July and prices in August.

You have to check if the two prices are equal or not.

Just use the following formula.

=IF(C5=D5,TRUE)

Here, C5 is the price in July, and D5 is the price in August.

Finding Equal Cell Value

Example 5: NOT Function With TRUE

Like the TRUE function, NOT is also a logical function. This function helps to verify that one value is not the same as another.

If you give TRUE, FALSE is returned and FALSE is given, TRUE will be returned.

In essence, it always returns a logical opposite value.

So you can check whether the price is not greater than $200 using the following formula.

=IF(NOT(C5>=200),TRUE)

NOT Function With TRUE

Example 6: AND Function With TRUE

The AND function returns either TRUE or FALSE based on more than one condition.

Assuming that, you want to match the product and price with separate conditions e.g. product will be TV and the price is greater than or equal to $500.

In such a situation the formula will be-

=IF(AND(B5="TV",C5>=500),TRUE)

AND Function With TRUE

Example 7: COUNTIF Function with TRUE

The COUNTIF is a function to count the number of cells with criteria. You can use the function to count the number of TRUE in a cell range.

The formula will be for the following figure is:

=COUNTIF(D5:D14,TRUE)

COUNTIF Function with TRUE

Example 8: Finding Numerical Values

The ISNUMBER function checks the cell value whether it is a number or not. IF the input is number, the result will be shown as TRUE otherwise, FALSE.

The formula is:

=ISNUMBER(B5)

Finding Numerical Value

Example 9: VLOOKUP Function With TRUE (Approximate Match)

The VLOOKUP is a popular Excel function to find the required value from a cell range based on the lookup value and types of the match i.e. TRUE is for approximate (closest) match and FALSE is for an exact match.

For example, the products are given with price and discount rate. You have to find the discount rate if the price is $350. But such a price is not in the given table.

So, you have to find the closest discount rate for the price of $350.

For this, use the following formula.

=VLOOKUP(F7,C5:D14,2,TRUE)

Here, the lookup price is $350, the cell range is C5:D14, 2 is the column index(as the price in the 2nd column), and TRUE is for an approximate match.

Note. While finding the approximate match, you must organize the value (cell range) from where you want to find the lookup value in ascending order. Otherwise, you’ll find inaccurate results.

VLOOKUP Function With TRUE

Example 10: Conditional Formatting Using TRUE

If you guys need to highlight the odd discount rate for better visualizations, you may use the Conditional Formatting toolbar from the Styles command bar.

Now select the data and open a New Formatting Rule dialog box by clicking Home tab>Conditional Formatting>New Rules.

Then choose the option Use a formula to determine which cells to format, and insert the following formula for the odd number. Lastly, open the format option to specify the highlighting color.

=ISODD(C5)

Conditional Formattting

Then you’ll get the following output.

Conditional Formatting Using TRUE

Things to Keep in Mind While Using the TRUE Function

  • The output for TRUE() and TRUE are similar. So, don’t be confused.
  • Excel automatically returns either TRUE or FALSE for any type of logical expression.
  • While computing, TRUE turns to 1 and FALSE turns to 0.

Conclusion

This is how you can apply the TRUE function to return the logical value TRUE. Also, you have the opportunity to combine the function with other Excel functions. If you have an interesting and unique method of using the TRUE function, please share it in the comments section below.

Thanks for being with me.


Further Readings

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo