SUMIF Function (OpenOffice Calc)

Math Beginner OpenOffice Calc Introduced in OpenOffice.org 3.0
conditional ranges arithmetic basic-functions

The SUMIF function in OpenOffice Calc adds values based on a single condition. Learn syntax, examples, common errors, and best practices.

Compatibility

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
If 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:

  • range and sum_range are 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 range and sum_range the 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 SUMIFS when multiple conditions are required
  • Use named ranges for cleaner formulas
For dynamic dashboards, store criteria in separate cells and reference them:
Example: =SUMIF(Category; F1; Sales)

Copyright 2026. All rights reserved.