The Excel TRUE function returns the Boolean value TRUE. The function provides compatibility with other spreadsheet programs.
In most cases, it is not necessary to use the TRUE function if you are working in Excel. The function’s only purpose is to generate the logical value TRUE.
The syntax is simple, and the TRUE() function does not use an argument.
Take a closer look at the formulas below! Both formulas use the IF function, and the results are the same.
- =IF(B3>=30, TRUE())
- =IF(B3>=30, TRUE)
The result is FALSE because the value is less than 30.
Don’t forget that logical expressions will automatically generate only two types of output: the formula will return TRUE or FALSE results based on Boolean logic.
Workaround with SWITCH and TRUE functions
In the following example, we’ll introduce a trick! With its help, you can use logical operators with the SWITCH function.
Our goal is simple: reduce the actual price by 10% if the price is greater than equal to 150 and less than equal to 300. If both logical tests are TRUE, the formula will return the following text string: “10%”. We will use the “-” string to handle errors in other cases.