Excel SUMIF function — sum with a condition

SUMIF adds only the rows that meet a condition — for example only the Baku branch's sales.

In other languages: ETOPLA (Türkçe), СУММЕСЛИ (Русский)

Syntax

SUMIF(range, criteria, [sum_range])

Arguments

range
The range the condition is checked in (e.g. the city column).
criteria
The condition: "Bakı", ">100", "<>Gəncə" or a cell (F1).
sum_range
The range to add; if left out, the first range is added.

Example

Find the total sales for Bakı only.

ABC
1CityEmployeeSales
2BakıAysel120
3GəncəMurad80
4BakıLeyla150
5SumqayıtOrxan50

Type the formula in C6

The formula in your Excel

  • English Excel=SUMIF(A2:A5,"Bakı",C2:C5)
  • Türkçe Excel=ETOPLA(A2:A5;"Bakı";C2:C5)
  • Русский Excel=СУММЕСЛИ(A2:A5;"Bakı";C2:C5)

The result is 270 (120 + 150).

✨ Have the AI explain this formula

Useful tips

  • Conditions with operators go in quotes: ">=100". With a cell: ">="&F1.
  • Use * and ? for partial matches: "Bak*".

Common errors

  • Result 0 — the text in the condition differs from the table (spaces, letters). Clean it with TRIM.