Calligra Sheets #VALUE!: Check a Negative Square-Root Input
A negative argument has no ordinary real square root. In the pinned Calligra implementation used here, that condition returns a VALUE error. Do not copy an error-code mapping from another spreadsheet and assume it applies here.
Evidence scope: reviewed October 21, 2026 against KDE’s Calligra source at commit 72123cc643f6625351139e7df294544255a1056f. The error outcomes below are source-inferred expectations, not observed application results. No Calligra installation or screenshot was used for this guide. English error strings are shown; localized displays may differ. This does not clear existing import failures or establish behavior in every packaged version.
The Calligra-specific distinction
The SQRT callback checks whether its argument is at least zero. Otherwise it returns errorVALUE(). The English VALUE definition is #VALUE!. Consequently, a negative numeric SQRT argument is a source-supported VALUE case, not a documented NUM case in this implementation.
This does not mean every VALUE error comes from SQRT. First inspect the failing formula and identify the argument that this particular function receives.
Repair a reversed subtraction
Suppose the calculation needs the square root of the amount remaining after a deduction. Use a scratch sheet:
- Enter
81in A2 and32in B2. - In C2, enter the deliberately reversed subtraction
=B2-A2. Its expected result is-49. - In D2, enter
=SQRT(C2). The source-inferred expected error is#VALUE!because C2 is negative. - After confirming that the intended calculation is A2 minus B2, change C2 to
=A2-B2. C2 should become49and D2 should become7. - Change B2 to
17. The expected intermediate result becomes64and the expected square root becomes8. Restore32afterward.
The positive results are independently checked: 7 × 7 = 49 and 8 × 8 = 64. To reproduce the failure, reverse the subtraction again only in the disposable copy. None of these outcomes was observed in a running Calligra application for this page.
Avoid a mathematically different workaround
Do not automatically take the absolute value of C2. That hides whether the subtraction was reversed, the inputs were wrong or a negative result was genuinely meaningful. Confirm the model before changing signs. If negative values are valid and the task actually requires complex arithmetic, that is a different calculation; the ordinary SQRT reference should not be treated as a promise of complex output.
For a large nested formula, inspect the expression feeding SQRT in a helper cell in your test copy. That makes it easier to distinguish a negative argument from an upstream reference or data problem. See cross-sheet references if the argument comes from another sheet, and recalculation checks if changed inputs are not reflected.
Record the evidence
Keep both the original formula and the corrected formula, the intermediate numeric value and the expected result. Save and reopen the repaired copy. If the installed build reports a different error, record its exact version and actual output rather than treating the source-based expectation as native proof.
Return to the error selector or the broader troubleshooting reference.