ISNUMBER treats TRUE/FALSE differently in LibreOffice than in Excel
Excel classifies a logical value as its own type, distinct from a number, so
=ISNUMBER(TRUE) returns FALSE. LibreOffice Calc returns TRUE for the same call.
A formula that branches on ISNUMBER can therefore take the opposite path in each app, with no
error to flag it.
The surprise
A boolean participates in arithmetic as 1 or 0 in both engines, but Excel still does not consider it a number for type tests. LibreOffice does. So ISNUMBER of the same TRUE flips between the two.
A minimal example
| Formula | Excel (documented) | Google Sheets | LibreOffice Calc 25.8.7.3 (executed) |
|---|---|---|---|
| =ISNUMBER(TRUE) | FALSE | Not yet executed | TRUE |
FALSE is the documented-expected value in our test corpus; TRUE is what our harness computed by recalculating in LibreOffice Calc 25.8.7.3. We have not yet executed this case in Google Sheets.
Why it happens
Microsoft's IS-functions documentation names ISLOGICAL as the dedicated test
for a TRUE/FALSE value and states that the value arguments to these functions "are not converted,"
which places a logical in its own type, separate from numbers. Under that type system ISNUMBER of
a logical is FALSE, and that is the long-established result our corpus records for Excel.
LibreOffice, which our harness executes, evaluates a boolean as a number in this test and returns
TRUE. The Microsoft docs do not print an explicit ISNUMBER(TRUE) example, so we are
careful to attribute the FALSE result to the documented type separation rather than a single
worked example. See Microsoft's
IS functions reference.
How to migrate safely
If a formula uses ISNUMBER to detect a real number, add an explicit logical guard so it behaves the same in every engine:
=AND(ISNUMBER(A1),NOT(ISLOGICAL(A1)))
If you actually want to detect a boolean, test it directly with =ISLOGICAL(A1)
rather than leaning on ISNUMBER's answer.
The practical damage shows up in validation checks and dashboards. A guard like
=IF(ISNUMBER(A1),A1*rate,0) quietly skips a boolean input in Excel but multiplies it
as 1 in LibreOffice, so a computed total can change with no error and no obvious cause. Auditing
any workbook whose logic keys off ISNUMBER on cells that might hold TRUE/FALSE is worthwhile before
you move it, because the branch can silently invert.