Logical · the boolean constant · Nov 2026

The TRUE function,
measured & explained.

Syntax, a live playground, a measured coercion gallery, the SUM-ignores-booleans trap, and a sourced error library: the logical constant TRUE.

D1
fx
=TRUE()
0
measured gallery rows
0
sourced errors fixed
0
platforms checked
// 01 — Anatomy

How TRUE works

Returns the logical value TRUE. It takes no arguments; its interest is how TRUE coerces in math, comparisons and aggregates.

=TRUE()
no argumentsTRUE() takes none; it returns the logical value TRUE.
vs literalThe bare literal TRUE also works in Excel.
coercionIn math TRUE behaves as 1.
// 02 — The boolean constant

What TRUE actually does

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.

Measured behavior gallery

ExpressionResultWhy
=TRUE()TRUEThe function returns the logical value TRUE
=TRUE()+12In arithmetic TRUE coerces to 1
=TRUE()*55TRUE behaves as 1 in math
=TRUE()+TRUE()2Two TRUEs add to 2
=TRUE="TRUE"FALSELogical TRUE is not the text "TRUE"
=IF(TRUE,"yes","no")yesIF takes the TRUE branch
=AND(TRUE,1)TRUE1 coerces to TRUE inside AND
=NOT(TRUE)FALSENOT flips TRUE to FALSE

The SUM trap: booleans in a range are ignored

This is the most common TRUE surprise. SUM ignores logical values in a reference, but counts them as direct arguments. Measured below.

ExpressionResultWhy
=SUM(A2:A5)0The flag column holds booleans; SUM ignores them in a range
=SUM(TRUE,TRUE)2As direct arguments, logicals count (TRUE=1)
=SUMPRODUCT(--A2:A5)2The double unary coerces booleans to 1/0 first
=COUNTIF(A2:A5,TRUE)2COUNTIF does match logical TRUE
⚠ SUM ignores booleans in a range. Adding a column of TRUE/FALSE with SUM gives 0. Coerce first with -- (SUMPRODUCT) or count with COUNTIF.
TRUE() vs the literal TRUE. Both work in Excel; some HyperFormula-based apps need the function form TRUE() or a registered literal. This playground registers both for you.
// 03 — Try it live

Interactive TRUE playground

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.

A1Sample data — click any cell to edit, the formula re-evaluates live
Result
—
✓ readyHyperFormula 3.5
// 04 — Error library

The real-world error library

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.

// 05 — Cross-platform

Where TRUE works

TRUE is available across modern Excel, Google Sheets and LibreOffice. It has been in Excel since 2003.

PlatformSupportNotesGotcha
✓ Supported full TRUE◐ Partial works with caveatsCompiled from public docs · verify against your build
// Go deeper

Master logical logic

TRUE is one piece. The full course walks the toolkit end to end with live, measured examples.

  • TRUE / FALSE — the boolean constants
  • Coercion: TRUE=1, FALSE=0 in math
  • The SUM-ignores-booleans trap
  • Combining constants with AND/OR/IF
Free while in beta
Browse the function library

No account needed. Every page has a live playground.

// 07 — FAQ

Frequently asked