SUM Function (OpenOffice Calc)
The SUM function in OpenOffice Calc adds numbers, cell ranges, or mixed arguments. Learn syntax, examples, common errors, and best practices.
Verification status: Consult the documentation, examples and any stated test scope below. How formula examples are checked
The SUM function adds numbers, cell references and ranges in OpenOffice Calc.
Quick answer: in a new sheet, put 10 in A1, 20 in A2 and -5 in A3, then enter =SUM(A1:A3) in E1. The expected result is 25. E1 stays outside the input range, avoiding a circular reference.
Example scope: Apache OpenOffice Calc desktop, English function names; documentation and tagged 4.1.16 source checked on 2026-10-24. The expected results below were independently calculated, not run in OpenOffice. No native input-type, GUI, save/reopen or other-application test is claimed for these examples.
Availability and version history
- Introduced: Documented by Apache OpenOffice 4.1.16; original introduction not established.
- Availability: Supported in Apache OpenOffice 4.1.16, verified against its function registry. This identifies a supported release, not a final working version.
- Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
- Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
What the SUM Function Does
- Adds numeric values from one or more arguments.
- Accepts individual cells and rectangular ranges, including references to other sheets.
- Ignores text and empty cells inside a range, as described in the official SUM reference.
- Includes a numeric cell again if it appears in a second argument. SUM does not deduplicate overlapping ranges.
Syntax
=SUM(number1; number2; ...)
A colon creates a range: A1:A3 includes A1, A2 and A3. A semicolon separates arguments: A1;A3 lists only A1 and A3. The Apache OpenOffice 4.1 function-structure guide uses semicolons as argument separators; these examples follow that syntax.
Do not replace every comma in a copied formula. Commas inside quoted text or used as decimal marks are not argument separators. Check the formula’s structure and numeric convention first. The one-range formula =SUM(A1:A3) avoids the argument-separator choice entirely.
Basic Examples
Enter the complete practice cells
Use a fresh sheet named Sheet1, with ordinary numeric cells in their default format. The first three entries are the quick-answer inputs; do not enter them twice. Enter each value separately so pasting does not start an import workflow.
| Cell | What to enter | Intended stored value |
|---|---|---|
| A1 | 10 |
Number 10 |
| A2 | 20 |
Number 20 |
| A3 | -5 |
Number -5 |
| A4 | '30 |
Text 30, not the number 30 |
| A5 | Leave completely empty | No value or formula |
| A6 | note |
Text note |
| C1 | 2 |
Number 2 |
| C2 | 3 |
Number 3 |
| C3 | 5 |
Number 5 |
A4 starts with a straight apostrophe. The official number-as-text instructions describe this method: the apostrophe marks text entry and is not displayed as part of the cell’s value. Do not type the words “Leave completely empty” in A5, a space, or a formula returning an empty string.
Add a range of cells
Enter in E2:
=SUM(A1:A6)
Expected: 25, from 10 + 20 - 5. A4’s text 30, empty A5 and text A6 do not contribute. Compare with E1: both totals should be 25 even though E2 includes three more cells.
Add multiple ranges
Enter in E3:
=SUM(A1:A6;C1:C3)
Expected: 35, from 25 + (2 + 3 + 5). The two ranges do not overlap.
Add specific values
Enter in E4:
=SUM(5;12;19)
Expected: 36. These are direct numeric arguments, not cell contents.
Enter in E5 to mix a range, an unquoted number and a reference:
=SUM(A1:A6;25;C2)
Expected: 53, from 25 + 25 + 3. Use unquoted numbers for direct numeric arguments. The text/blank rule for ranges is not a promise that quoted arguments such as "30" will be ignored or converted. Direct quoted-text conversion and error presentation are not established by these exercises.
Check overlapping ranges and endpoints
Enter in E6:
=SUM(A1:A3;A2:A3)
Expected: 40, from (10 + 20 - 5) + (20 - 5). A2 and A3 are counted twice. If every cell should contribute once, use =SUM(A1:A3) instead. This expectation follows the per-argument accumulation in the 4.1.16 SUM implementation, not a new native run.
Enter =SUM(A1;A3) in E7. Expected: 5, because this lists the endpoints only; it does not include A2.
Change, check and restore
- Change A3 from -5 to -2. E1 and E2 should become 28. Restore -5 and expect 25 again.
- Replace A4’s text entry with the unquoted number 30. E2 should become 55. Restore A4 by entering
'30; E2 should return to 25. - In E8, enter
=ISNUMBER(A4). Expected: FALSE with the restored text entry, TRUE during the numeric control. This checks the stored type, not its appearance; see ISNUMBER.
These are independent expected controls. The number-as-text entry and all changes still need verification in the installed OpenOffice build; another Calc application’s result is not evidence for OpenOffice.
Advanced Examples
Add values across sheets
After restoring the basic inputs, add two sheets named Sheet2 and Sheet3. Arrange the three tabs in the order Sheet1, Sheet2, Sheet3, with no intervening sheets. Put 7 in Sheet2.A1 and 3 in Sheet3.A1. Leave the other cells on those two new sheets empty.
In Sheet1.E10, enter:
=SUM(Sheet1.A1:A3;Sheet2.A1)
Expected: 32, from 25 + 7. The dot separates a sheet name from its cell reference, as in the 4.1.16 reference Help.
Add values across sheets using 3D ranges
With those same three adjacent sheets, enter in Sheet1.E11:
=SUM(Sheet1.A1:Sheet3.A1)
Expected: 20, from Sheet1.A1 = 10, Sheet2.A1 = 7 and Sheet3.A1 = 3. This range includes A1 on every sheet from the first endpoint through the last. The official range-operator guide documents this sheet-and-cell endpoint notation. Inspect the sheet order and both endpoints rather than assuming that a sheet name alone identifies all included data.
Add values with conditions (SUMIF)
On Sheet1, enter this separate table in G1:I4; its first row contains the headings:
| G: Region | H: Units | I: Amount |
|---|---|---|
| North | 2 | 40 |
| South | 3 | 90 |
| North | 4 | 100 |
Enter in K2:
=SUMIF(G2:G4;"North";I2:I4)
Expected: 140, from 40 + 100. Use SUMIF when a condition selects the values to add.
Add values with multiple conditions (SUMIFS)
SUMIFS was introduced in Apache OpenOffice 4.0, according to its official release notes. It is present in the 4.1.16 function registry. This is version/source evidence, not a native test or a claim about an older release.
Using G1:I4 above, enter in K3:
=SUMIFS(I2:I4;G2:G4;"North";H2:H4;">2")
Expected: 100. Only the final row is North with more than two units. The sum range comes first, followed by each criteria-range/criterion pair; all ranges here cover the same three rows. See the official conditional-sum explanation and the existing SUMIFS reference. For older releases, do not assume this function is available; a replacement formula needs its own version and input-type checks.
Add only visible cells (filtered data)
For the same G1:I4 table, enter =SUBTOTAL(9;I2:I4) in K4. Before filtering, the expected result is 230. Filter that table’s Region column to North, following the sort and filter guide: the expected subtotal becomes 140. In K5, enter =SUM(I2:I4): it still includes all three numeric amounts and totals 230 before and after that filter.
The official SUBTOTAL documentation identifies 9 as the sum operation for filtered records. Filtering is not the same as manually hiding rows; this exercise does not establish a rule for every kind of hidden row. Clear the filter afterward. See SUBTOTAL for that separate function’s scope.
Common Errors and Fixes
Err:508 — Missing bracket or parenthesis
Check that each opening parenthesis has a matching closing one. The official error-code guide describes 508 as a missing pair; it does not establish that every separator mistake produces this code. Start with the small working syntax =SUM(A1:A3) and compare your formula one part at a time.
Err:504 — Parameter list error
Check the argument types and the shape of each reference against the function’s syntax. Reduce a complex formula to the basic range example, then add arguments back individually. Text inside a SUM range is normally ignored, so a text label in A6 alone is not evidence of a 504 error.
SUM returns 0 or a total that is too small
- Inspect the formula’s actual range; newly added rows may lie outside it.
- Test a suspect amount with
ISNUMBER, as in E8. A numeric-looking string is not necessarily a number, and a display-format change alone does not prove conversion. - For this small exercise, re-enter only a known amount as an unquoted number and compare the expected total. Do not convert identifiers simply because they contain digits.
- For imported data, keep the original and check delimiter, language and field types in the OpenOffice CSV import guide. Do not apply Text to Columns and immediately accept its defaults: the separate splitting guide explains preview settings and the risk of overwriting neighboring cells.
The total is too large, circular or stale
Check repeated arguments and overlaps against E6. Keep result cells outside their own input ranges. If an input change does not update a formula, inspect its references and follow the recalculation and circular-reference guide rather than enabling iteration to suppress an accidental loop.
Best Practices
- Keep raw inputs separate from totals and include only the intended rows and columns.
- Check both the arithmetic and the stored types; a plausible total can still omit text amounts.
- Use SUMIF or version-supported SUMIFS for criteria, and SUBTOTAL for the documented filtered-record task.
- Use named ranges only after checking their definitions; the named-range guide covers that separate setup.
- Preserve the stated version and evidence scope when reusing an example. Independent arithmetic is not native application verification.