WorkbookLogic
FunctionMathintermediateSUMIFIFROUND

SUMIF Function

By WorkbookLogic

The Excel SUMIF function adds values that meet one condition. The tested range and summed range can be the same or separate, provided their rows remain aligned.

ExcelLast reviewed Sep 11, 2026
sumif-function-v1.0.0.xlsx
Excel SUMIF Function
Sum values when one condition is met; source data, criteria, syntax, and live totals stay in one view.
Source data, editableSUMIF examples
CategoryStatusAmountExampleCriterionFormula syntaxResult
TravelApproved1,200.0Selected category totalTravel=SUMIF(A12:A21,F12,C12:C21)4,390.0
SoftwareApproved850.0Selected status totalApproved=SUMIF(B12:B21,F13,C12:C21)5,635.0
TravelPending1,450.0Amounts above threshold>1000=SUMIF(C12:C21,F14,C12:C21)6,575.0
FacilitiesApproved0.0
SoftwarePending1,100.0How to read the examples
TravelApproved760.0The criteria range decides which rows qualify.
SoftwareApproved1,325.0The editable criterion can be text, a number, or an operator expression.
FacilitiesRejected-100.0The result updates when source values or the criterion changes.
TravelPending980.0
FacilitiesApproved1,500.0
Reliability checks
Travel total reconciles to its four visible source rowsOK
Approved total includes zero and the negative row only when criteria matchOK

Overview

The Excel SUMIF function creates a conditional total. It tests one range against a criterion and adds either the matching cells in that range or the corresponding cells in a separate sum_range.

Quick reference

Syntax: =SUMIF(range, criteria, [sum_range])

Returns: The sum of numeric values whose corresponding cells satisfy the criterion. (number)

Arguments:

  • range (required) — The cells tested against the criterion.
  • criteria (required) — The text, number, expression, cell reference, or wildcard pattern that determines which rows qualify.
  • sum_range (optional) — The cells to add for qualifying positions; when omitted, Excel sums numeric cells in range.

The bracketed sum_range argument is optional. When omitted, Excel sums qualifying numeric cells in range; when supplied, it must align positionally with the tested range.

Common uses

  • Total expenses for one category.
  • Sum approved, open, or overdue amounts.
  • Add values above or below a threshold.
  • Total amounts for dates before or after a cutoff.

Calculations

SUMIF first evaluates each cell in range. When a cell satisfies criteria, Excel adds the value at the same relative position in sum_range. If sum_range is omitted, the tested range is also the range being summed.

The tested and summed ranges should cover corresponding rows. Excel can resize a sum_range from its upper-left cell, but relying on that behavior can produce a plausible total from unintended cells. Explicit, equal-sized ranges are easier to audit.

Criteria can be text, a number, a cell reference, or an expression such as ">1000". To combine an operator with a value stored in a cell, concatenate them, as in ">"&F14. Text comparisons are not case-sensitive, and wildcard matching is available for text.

Function behavior

Situation

Behavior

Omitted sum_range

Numeric cells in range that meet the criterion are summed.

No matches

Returns 0.

Text in sum_range

Ignored because it is not numeric.

Zero

Included when its row qualifies but does not change the total.

Negative values

Reduce the total when their rows qualify.

Blank criteria

"" targets blanks and "<>" targets nonblanks.

Text case and wildcards

Matching is not case-sensitive; * and ? support text patterns.

Range alignment

sum_range is mapped by relative position from its upper-left cell, so mismatched ranges can total unintended cells.

Errors

A relevant error in a tested or summed cell can propagate to the result.

Common errors

Reversing range and sum_range

What happens:
Excel tests the amount cells and attempts to sum the category or status cells, producing zero or the wrong result.

Better approach:
Put the field being tested first and the numeric values to add third.

Omitting sum_range when another column should be totaled

What happens:
Excel tries to sum numeric cells in the criteria range itself.

Better approach:
Supply the aligned amount range explicitly whenever the tested and summed fields differ.

Using mismatched boundaries

What happens:
Qualifying rows can map to unintended values because Excel aligns positions from the upper-left cells.

Better approach:
Use ranges with the same number of rows and matching start and end records.

Adding a second condition

What happens:
SUMIF has no second range-criterion pair.

Better approach:
Use SUMIFS for two or more AND-based conditions.

Example

Example 1 — Sum by Category

=SUMIF(A12:A21,F12,C12:C21)

With Travel in F12, the workbook adds four matching Amount values and returns 4,390.

Example 2 — Sum by Status

=SUMIF(B12:B21,F13,C12:C21)

This tests the Status column and sums the aligned Amount column. Approved rows total 5,635.

Example 3 — Test and Sum the Same Range

=SUMIF(C12:C21,F14,C12:C21)

The Amount range is used for both the comparison and the total. With >1000 in F14, the result is 6,575.

Example workbook

The workbook contains a SUMIF Example sheet with ten editable Category, Status, and Amount records. Three live formulas demonstrate category, status, and threshold criteria, and two checks reconcile the Travel and Approved totals. A Notes sheet covers syntax, operators, and range alignment.

Key takeaway

Use SUMIF when one condition controls a total, and keep the tested range and summed range explicitly aligned.