Abdul Alim: a little bit learning, let's go
Excel, VBA and Power BI tutorials
Abdul Alim: a little bit learning, let's go
Excel, VBA and Power BI tutorials
The TRUE formula is a simple yet significant part of Excel’s rich array of formulas. It’s one of the logical formulas that returns the logical value TRUE.
The TRUE formula serves to return the logical value “TRUE”. It’s often used in creating formulas in Excel and is instrumental in Excel functions for data analysis, as it’s a crucial part of many logical expressions used in other formulas.
The syntax of the TRUE formula is as simple as it gets:
=TRUE()
The TRUE formula takes no arguments.
The TRUE formula always returns the logical value TRUE.
While the TRUE formula itself is straightforward, its power comes from using it within other formulas. It’s an integral part of logical expressions often used in IF, AND, OR formulas.
The TRUE formula is available in all versions of Excel.
In an IF formula, you can use TRUE to return a specific value:
=IF(TRUE, "Yes", "No")
This formula will always return “Yes”.
You can use the TRUE formula to test logical conditions. For instance, if we want to check if the value in cell A2 is greater than 100:
=IF(A2>100, TRUE, FALSE)
Combine the TRUE formula with AND for more complex conditions. Here we’re checking if the value in A2 is greater than 100 and less than 200:
=IF(AND(A2>100, A2<200), TRUE, FALSE)
Similarly, with the OR formula, we can check if the value in A2 is either less than 50 or greater than 200:
=IF(OR(A2<50, A2>200), TRUE, FALSE)
The TRUE formula is also handy when creating dropdown lists with data validation. You can use TRUE to show all values or a condition to filter values:
=IF(D2="All", TRUE, A2=D2)
The TRUE formula is more useful when you use it in conjunction with other formulas. Remember, Excel interprets non-zero numbers as TRUE and zero as FALSE.
The TRUE formula itself doesn’t have limitations but remember that Excel’s logical operations interpret TRUE as 1 and FALSE as 0.
A common mistake is to treat the text strings “TRUE” and “FALSE” as logical values. In Excel, the logical values TRUE and FALSE are not text, and treating them as such can lead to unexpected results.
Using the TRUE formula, while simple, can be powerful when used in the right context. Always test your logic with different inputs to ensure you’re getting the expected results.
Related Excel formulas include:
FALSE: This formula returns the logical value FALSE.
IF: This formula checks a condition and returns one value if TRUE, another if FALSE.
AND, OR: These formulas test whether all conditions or any condition, respectively, are TRUE.
The TRUE formula is often used with IF, AND, OR, NOT, and other logical and comparison formulas.
No, the TRUE formula doesn’t require any arguments.
Excel interprets the logical value TRUE as 1 in calculations.
Yes, you can use the TRUE formula in array formulas. However, its usage would depend on the logic of the array formula.
In Excel, the logical value TRUE is not the same as the text string “TRUE”. Be careful when writing and debugging your formulas.
By understanding the TRUE formula, you can build more complex logical expressions in Excel and advance your data analysis skills.