ExcelTool.io

SUMIF

Adds the cells in a range that meet a single condition.

Syntax

=SUMIF(range, criteria, [sum_range])

Arguments

  • range - The range checked against the criteria.
  • criteria - The condition, e.g. ">100", "West", or a cell reference.
  • sum_range (optional) - The cells to add. If omitted, range itself is summed.

Examples

=SUMIF(A2:A50, "West", B2:B50)

Returns: Total of B where A is "West"

Sums the sum_range on rows where the criteria range matches.

=SUMIF(B2:B50, ">100")

Returns: Sum of values over 100

With no sum_range, the tested range is summed.

Common Errors and Gotchas

  • Text and comparison criteria must be quoted: ">100", not >100.
  • range and sum_range must be the same size, or results shift unexpectedly.
  • For more than one condition, use SUMIFS.

Does SUMIF Work in Google Sheets?

Yes. SUMIF uses the same syntax in Google Sheets and LibreOffice Calc, so you can paste these formulas straight across.

Build a SUMIF formula

Fill in your ranges and copy a ready-to-paste formula - no signup.

SUMIF Generator