SUMIF Function (OpenOffice Calc)
The SUMIF function in OpenOffice Calc adds values based on a single condition. 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
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.
The SUMIF function in OpenOffice Calc allows you to add values that meet a specific condition. It is ideal for filtering totals by category, threshold, text match, or any logical rule. Whether you’re analyzing sales by region, summing expenses above a certain amount, or isolating values by label, SUMIF is one of the most essential conditional functions in OpenOffice Calc.
What the SUMIF Function Does
- Adds values that meet a single condition
- Supports numeric, text, and logical criteria
- Works with ranges of any size
- Allows comparison operators (
>,<,>=,<>, etc.) - Supports wildcard matching (
*and?) - Works across sheets
- Ignores empty cells automatically
SUMIF is optimized for fast conditional aggregation and is widely used in financial models, inventory sheets, and categorized datasets.
Syntax
SUMIF(range; criteria; sum_range)
Arguments:
- range — The cells to evaluate against the condition
- criteria — The condition to test (text, number, or expression)
- sum_range — The cells to sum when the condition is met
sum_range is omitted, OpenOffice Calc sums the range itself.
Basic Examples
Sum values greater than a number
=SUMIF(A1:A10; ">50"; B1:B10)
Adds values in B1:B10 where the corresponding value in A1:A10 is greater than 50.
Sum values equal to text
=SUMIF(A1:A10; "North"; B1:B10)
Adds values in B1:B10 where A1:A10 equals "North".
Sum values matching a wildcard
=SUMIF(A1:A10; "Jan*"; B1:B10)
Matches any text beginning with “Jan”.
Sum values in the same range
=SUMIF(A1:A10; ">0")
Sums all positive numbers in A1:A10.
Advanced Examples
Sum values across sheets
=SUMIF(Sheet1.A1:A100; ">100"; Sheet1.B1:B100)
Sum values using cell‑based criteria
=SUMIF(A1:A10; C1; B1:B10)
If C1 contains ">=500", the formula uses that condition.
Sum values not equal to something
=SUMIF(A1:A10; "<>North"; B1:B10)
Sum values with partial text match
=SUMIF(A1:A10; "*Service*"; B1:B10)
Matches any text containing “Service”.
Sum values using numeric comparisons
=SUMIF(A1:A10; "<=100"; B1:B10)
Sum values with dates
=SUMIF(A1:A10; ">=" & DATE(2025;1;1); B1:B10)
Common Errors and Fixes
Err:508 — Missing parenthesis
Usually caused by:
- Missing
) - Incorrect concatenation of criteria
- Using commas instead of semicolons
Err:504 — Parameter error
Occurs when:
rangeandsum_rangeare different sizes- A malformed condition is used
- A text condition is missing quotes
SUMIF returns 0 unexpectedly
Possible causes:
- Text numbers in the range
- Hidden apostrophes (
'123) - Criteria not matching due to spacing or case
- Wildcards not used correctly
Fix: Convert text to numbers:
Data → Text to Columns → OK
Best Practices
- Keep
rangeandsum_rangethe same size - Use cell references for criteria to make formulas dynamic
- Use wildcards for flexible text matching
- Avoid mixing text and numbers in the same column
- Use
SUMIFSwhen multiple conditions are required - Use named ranges for cleaner formulas
Example:
=SUMIF(Category; F1; Sales)