ShareYourGroupShareYourGroupExcel Formulas

Math functions

SUMIF function in Excel

SUMIF adds up the cells that meet one condition.

SUMIF answers questions of the form "what is the total for this?": sales for one region, expenses for one category, hours for one employee. It is one of the functions that turns a list into a report.

Syntax

=SUMIF(range, criteria, [sum_range])
ArgumentWhat it is
rangeThe cells to test against the condition.
criteriaThe condition, such as "North", ">1000" or a cell reference.
sum_rangeThe cells to add. If left out, the tested cells themselves are added.

Examples

Each result below is what Excel itself showed for the formula on the sample sheet.

Sample sheet: Twelve sales made by four salespeople in three regions.
ABCDEF
1DateSalespersonRegionProductUnitsAmount
205-Jan-2026AshaNorthNotebook201200
312-Jan-2026RaviSouthPen50500
420-Jan-2026MeenaNorthBag43000
502-Feb-2026AshaEastPen30300
614-Feb-2026KabirSouthNotebook15900
728-Feb-2026RaviNorthBag21500
803-Mar-2026MeenaEastNotebook402400
915-Mar-2026AshaNorthBag32250
1022-Mar-2026KabirSouthPen60600
1101-Apr-2026RaviEastNotebook251500
1218-Apr-2026MeenaNorthPen80800
1306-May-2026AshaSouthBag53750

How it works

SUMIF goes down the first range and tests each cell against the condition. For every cell that passes, it adds the cell on the same row of the sum range.

The two ranges should be the same size and start on the same row. If they do not line up, Excel still gives an answer, taken from the wrong rows, with no error. This is the mistake to watch for.

Writing the condition

To matchWriteExample
text exactlythe text in quotation marks"North"
a number exactlythe number500
greater or less thansign and number, together in quotation marks">1000"
not equal to"<>" and the value"<>Pen"
the value in a cellthe cell referenceH1
a comparison with a cellsign in quotation marks, &, the cell">"&H1
part of a textwildcards"*book*"
empty cellstwo quotation marks""
cells that are not empty"<>""<>"

The rule that trips people up: a comparison sign must be inside quotation marks, and a cell reference must be outside them. ">H1" looks for the text H1. ">"&H1 uses the number in the cell.

Text conditions ignore capital and small letters. "north" matches North.

Putting the condition in a cell

Typing "North" into the formula means editing the formula for each region. Put the region names in a column and point the formula at them: =SUMIF($C$2:$C$13,H2,$F$2:$F$13). Copy it down beside the list of regions and you have a summary table. The dollar signs keep the two ranges fixed while H2 moves.

Dates

Dates are numbers inside Excel, so comparisons work. Build the date with DATE, or point to a cell holding one. Typing a date as text inside the quotation marks depends on the computer's regional settings and may be read as month first, so avoid it. For a whole month you need two conditions, a start and an end, which is a job for SUMIFS.

Limits

Common mistakes

In Google Sheets

SUMIF works the same way in Google Sheets.

Related functions

Every result on this page was calculated in Microsoft Excel (version 16.0, build 20326) on 12 November 2026, not typed by hand.

This is an independent help site. It is not connected with or approved by Microsoft. Excel and Microsoft 365 are trademarks of Microsoft Corporation, named here only to say which program a formula is for. The people and figures in the sample sheets are made up.