Syntax, a live playground, a measured coercion gallery, the SUM-ignores-booleans trap, and a sourced error library: the logical constant TRUE.
Returns the logical value TRUE. It takes no arguments; its interest is how TRUE coerces in math, comparisons and aggregates.
TRUE() takes no arguments and returns the logical value TRUE. Its real interest is coercion: how TRUE behaves in math, comparisons and aggregates. Every row below was measured live in HyperFormula. Click any row to load it into the playground.
| Expression | Result | Why |
|---|---|---|
| =TRUE() | TRUE | The function returns the logical value TRUE |
| =TRUE()+1 | 2 | In arithmetic TRUE coerces to 1 |
| =TRUE()*5 | 5 | TRUE behaves as 1 in math |
| =TRUE()+TRUE() | 2 | Two TRUEs add to 2 |
| =TRUE="TRUE" | FALSE | Logical TRUE is not the text "TRUE" |
| =IF(TRUE,"yes","no") | yes | IF takes the TRUE branch |
| =AND(TRUE,1) | TRUE | 1 coerces to TRUE inside AND |
| =NOT(TRUE) | FALSE | NOT flips TRUE to FALSE |
This is the most common TRUE surprise. SUM ignores logical values in a reference, but counts them as direct arguments. Measured below.
| Expression | Result | Why |
|---|---|---|
| =SUM(A2:A5) | 0 | The flag column holds booleans; SUM ignores them in a range |
| =SUM(TRUE,TRUE) | 2 | As direct arguments, logicals count (TRUE=1) |
| =SUMPRODUCT(--A2:A5) | 2 | The double unary coerces booleans to 1/0 first |
| =COUNTIF(A2:A5,TRUE) | 2 | COUNTIF does match logical TRUE |
-- (SUMPRODUCT) or count with COUNTIF.TRUE() or a registered literal. This playground registers both for you.Edit the table or type any formula — the HyperFormula engine evaluates it instantly. Load a preset to see TRUE coerce in math, branch in IF, and hit the SUM-ignores-booleans trap.
6 failure patterns mined from actual user reports on Reddit, Stack Overflow and Super User — each with the authentic symptom, root cause, a fix, and a runnable formula. Not textbook theory.
TRUE is available across modern Excel, Google Sheets and LibreOffice. It has been in Excel since 2003.
| Platform | Support | Notes | Gotcha |
|---|
TRUE is one piece. The full course walks the toolkit end to end with live, measured examples.