What is the TRUE function?
=TRUE()TRUE returns the logical value TRUE. It has no arguments.
According to Microsoft, the function exists mainly for compatibility with other spreadsheet programs; typing TRUE directly in a formula or cell gives the same value.
You rarely type TRUE() as a function, but the value TRUE turns up everywhere: comparisons, AND and OR, cells linked to check boxes, the IS functions. In arithmetic it counts as 1, so you can count TRUE values or keep only matching rows by multiplying.
Arguments
This function has no arguments. Write it with empty parentheses, like =NAME().
TRUE examples
Example 1. TRUE when a condition holds
=IF(A1=1, TRUE())The same as =IF(A1=1, TRUE).
Example 2. Calculate with it
=TRUE()+1TRUE counts as 1 in calculations, so the result is 2.
Example 3. TRUE in calculations
=TRUE()*5It acts as 1 in arithmetic, but compared with the number 1 the types differ.
Formula Result =TRUE()+TRUE() 2 =TRUE()*5 5 =--TRUE() 1 =TRUE()=1 FALSE Example 4. Count TRUE values
=COUNTIF(C2:C20, TRUE)Counts the TRUE cells in a TRUE/FALSE column, such as cells linked to check boxes.
Common mistakes
Writing "TRUE" in quotes
"TRUE" is text, which is not the same as the logical value.
Leaving out the parentheses
As a function, write TRUE() with parentheses. Plain TRUE without them is also the logical value.
Adding TRUE values with SUM
SUM skips TRUE values in a range. Use COUNTIF or =SUMPRODUCT(--(C2:C20=TRUE)).
FAQ
- What about false?
- Use the FALSE function or the value FALSE.
- Where does TRUE come from in practice?
- Comparisons such as A2>10 return TRUE or FALSE, so you rarely need the function itself.
- How do I show TRUE as "Yes"?
- =IF(C2, "Yes", "No").