Templates, guides & honest tool reviews for small business

Sunday, November 29, 2026

SUMIF Function in Excel: Examples with Text, Numbers and Dates

SUMIF function in Excel with examples
Illustration: SUMIF function in Excel

The SUMIF function in Excel adds up the numbers in a range that meet one condition, such as all sales for one region or all amounts above 100. This guide explains the syntax and shows SUMIF examples with made-up data: text conditions, number operators, wildcards, dates and a sum range that is different from the test range. It also shows when to switch to SUMIFS.

SUMIF syntax

=SUMIF(range, criteria, [sum_range])

  • range is the cells Excel tests.
  • criteria is the condition, such as "North" or ">100".
  • sum_range is the cells to add. If you leave it out, Excel adds the cells in the first range.
SUMIF in Excel to sum sales by region
Made-up sales by region (illustration).

Sum by a text condition

Say A2:A8 holds regions and B2:B8 holds sales. To total the sales of the North region:

=SUMIF(A2:A8, "North", B2:B8)

Text conditions are not case sensitive. You can also point to a cell that holds the region, so the formula updates when you change the cell:

=SUMIF(A2:A8, E1, B2:B8)

SUMIF in Excel with a greater than operator
Operators go inside quotes (illustration).

Sum numbers above or below a value

Place the operator inside quotes:

  • =SUMIF(B2:B8, ">100") adds the values above 100.
  • =SUMIF(B2:B8, "<=50") adds the values of 50 or less.

When the number is in a cell, join it with an ampersand: =SUMIF(B2:B8, ">" & E1).

Sum with a wildcard

An asterisk stands for any number of characters. To add the sales for every product that contains "desk":

=SUMIF(A2:A8, "*desk*", B2:B8)

Sum everything except one item

Use the not-equal operator:

=SUMIF(A2:A8, "<>North", B2:B8)

SUMIF in Excel to sum amounts after a date
Dates are numbers (illustration).

Sum by date

Dates are numbers, so operators work. To add amounts for dates after 1 November 2026:

=SUMIF(C2:C8, ">" & DATE(2026,11,1), B2:B8)

For a date range with a start and an end, use SUMIFS. Our guide to SUMIFS between two dates shows the pattern.

SUMIF or SUMIFS?

SUMIF has one condition. SUMIFS accepts many conditions. Note that the argument order is different: in SUMIFS the sum range comes first. If you need two or more conditions, use SUMIFS, and if you need to multiply columns before adding, see the SUMPRODUCT function.

SUMIF in Excel with a sum range in a different column
Test one column, add another (illustration).

Sum a different column than the one you test

This is what the third argument is for. Test the region in column A and add the profit in column D:

=SUMIF(A2:A8, "North", D2:D8)

The two ranges should have the same size, or the result will be wrong.

Common SUMIF mistakes

  • Result is zero. The numbers may be stored as text, or the criteria has an extra space.
  • Missing quotes. Operators and text must sit inside quotation marks.
  • Ranges of different sizes. Keep range and sum range the same shape.
  • Closed workbook. SUMIF to another workbook can return #VALUE! when that workbook is closed. Keep it open or bring the data into this file.

Questions and answers

Can SUMIF use two conditions?

Not by itself. Use SUMIFS, or add two SUMIF formulas when the conditions cannot overlap.

Does SUMIF work in Google Sheets?

Yes, with the same arguments.

How do I sum by color?

SUMIF cannot read cell color. Add a helper column that holds a value, such as a status, and sum by that instead.

How do I count instead of sum?

Use COUNTIF. Read about COUNTIFS in Excel.

Summary

Type the range, the condition in quotes and, when needed, the range to add. Switch to SUMIFS for several conditions and check that numbers are not stored as text.

العربية