Math & trig function

SUMIF function

Adds the cells that meet one condition, such as all sales for the East region or every invoice above 500.

Available in All versions of Excel, Excel for the web, Excel for Mac

In every Excel versionWorks in Google Sheets

Syntax

SUMIF(range, criteria, [sum_range])
ArgumentWhat it means
rangeRequiredThe cells tested against the condition, e.g. the Region column.
criteriaRequiredThe condition: a value ("East"), a comparison in quotes (">500"), a wildcard pattern ("Pro*") or a cell reference.
sum_rangeOptionalThe cells to add. Leave it out to add the cells of range itself.

Returns: The total of the values whose row meets the condition, or 0 if none do.

How SUMIF works

SUMIF answers questions like "how much did the East region sell?" or "what is the total of invoices over 1,000?". It scans one column for a condition and adds the matching values from another column (or from the same column). It replaces the manual habit of filtering a list and reading the status bar, and the result updates automatically when the data changes.

The condition is written as text. A plain value means "equal to" and is not case-sensitive ("east" matches East). Comparisons go inside quotes: ">500", "<=100", "<>Cancelled". To compare with a cell, join the operator and the reference: ">"&E1. Wildcards work for text: * means any number of characters and ? exactly one character, so "Pro*" matches every product that starts with Pro. Use ~* to look for a real asterisk.

range and sum_range should be the same size and shape. Excel actually uses the top-left cell of sum_range and stretches it to the size of range, so a shorter sum range does not raise an error but can add the wrong cells. For two or more conditions use SUMIFS, which also has a more logical argument order.

Examples

1Total sales for one region

E2fx=SUMIF(A2:A7, "East", C2:C7)
ABCDE
1RegionRepSales
2EastAna420011,950
3WestBen3150
4EastChloe5100
5NorthDev2800
6WestEma3900
7EastFemi2650

Result: 11,950

Rows 2, 4 and 7 have East in column A, so their sales 4,200 + 5,100 + 2,650 are added.

2Invoices above a threshold

E2fx=SUMIF(C2:C7, ">500")
ABCDE
1InvoiceClientAmount
2INV-101Atlas3203,900
3INV-102Brio1250
4INV-103Cora610
5INV-104Atlas95
6INV-105Delta2040
7INV-106Brio480

Result: 3,900

With no sum_range, the tested cells are also the cells added. Only 1,250, 610 and 2,040 are greater than 500.

3Wildcard match on product names

D2fx=SUMIF(A2:A6, "Pro*", B2:B6)
ABCD
1ProductUnits
2Pro Laptop 141849
3Office Chair40
4Pro Laptop 169
5Desk Lamp55
6Pro Monitor22

Result: 49

Pro* matches every name that starts with "Pro": the two laptops and the monitor, 18 + 9 + 22 units.

4Everything from 1 March onwards

E2fx=SUMIF(A2:A7, ">="&DATE(2026,3,1), C2:C7)
ABCDE
1DateStatusAmount
22026-02-27Paid9005,310
32026-03-02Paid1450
42026-03-09Open620
52026-03-17Paid2100
62026-03-30Open380
72026-04-01Paid760

Result: 5,310

The operator is joined to a real date with &. Every row except 27 February qualifies. Use SUMIFS if you also want an end date or only Paid rows.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 18 KB

Common errors and how to fix them

ErrorWhy it happensFix
Result is 0The criteria text does not match, often because of extra spaces in the data or a number stored as text.Test one cell with =A2="East"; clean the data with TRIM or convert text numbers.
Wrong totalsum_range is offset or a different size from range, so other rows are added.Make both ranges start on the same row and have the same number of rows.
#VALUE!A criteria string longer than 255 characters, or a reference to a closed workbook.Shorten the criteria or open the source workbook.

Tips

  • Put the condition in a cell (=SUMIF(A2:A7, E1, C2:C7)) so users can change it without touching the formula.
  • Never write ">E1" — Excel then looks for the literal text E1. Use ">"&E1.
  • Use whole columns (A:A, C:C) if rows are added often; SUMIF only reads the used area so it stays fast.
  • "<>" adds rows where the tested cell is not empty and "" adds rows where it is empty.

Questions

Can SUMIF use two conditions?

No. Use SUMIFS for several AND conditions, or add two SUMIFs together for an OR condition: =SUMIF(A:A,"East",C:C)+SUMIF(A:A,"West",C:C).

Is SUMIF case-sensitive?

No. For a case-sensitive total use =SUMPRODUCT(--EXACT(A2:A7,"East"),C2:C7).

SUMIF or SUMIFS?

SUMIFS does everything SUMIF does and puts the sum range first. Many people use SUMIFS everywhere so they only remember one argument order.

Google Sheets

SUMIF also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

SUMIF in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
DanishSUM.HVIS
DutchSOM.ALS
FinnishSUMMA.JOS
FrenchSOMME.SI
GermanSUMMEWENN
HungarianSZUMHA
ItalianSOMMA.SE
Norwegian (Bokmål)SUMMERHVIS
PolishSUMA.JEŻELI
Portuguese (Brazil)SOMASE
Portuguese (Portugal)SOMA.SE
RussianСУММЕСЛИ
SpanishSUMAR.SI
SwedishSUMMA.OM
TurkishETOPLA

Recipes that use SUMIF