Start practice

SUMIFS

AI for Excel ·

SUMIFS adds up the numbers in one column, but only on rows that meet every condition you set: sales in the West region for laptops, expenses in March over $100, hours for one project and one person. It is one of the most used functions in reports, and one of the most common formulas people ask AI for.

Syntax

Formula
=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
  • sum_range: the numbers to add, for example E2:E9.
  • criteria_range1: the column to test, for example C2:C9.
  • criteria1: the condition for that column, for example "West", ">=1000" or a cell like H1.
  • More pairs: add as many range and condition pairs as you need. A row is added only if it meets all of them.

All ranges must have the same number of rows.

Examples

The examples use this sheet, data in rows 2 to 9:

RowB DateC RegionD ProductE Amount
23/2/2026WestLaptop1200
33/3/2026EastMonitor300
43/5/2026WestMonitor250
53/8/2026NorthLaptop1100
63/9/2026EastLaptop1300
73/12/2026WestKeyboard80
83/15/2026NorthMonitor280
93/18/2026WestLaptop1150

Two text conditions

Question: total laptop sales in the West.

Formula
=SUMIFS(E2:E9,C2:C9,"West",D2:D9,"Laptop")

Result: 2,350 (rows 2 and 9). Rows 4 and 7 are West but not Laptop; rows 5 and 6 are Laptop but not West.

A number condition

Question: total of all orders of $1,000 or more.

Formula
=SUMIFS(E2:E9,E2:E9,">=1000")

Result: 4,750 (1,200 + 1,100 + 1,300 + 1,150). The same column can be both the range to add and the range to test.

A date range

Question: total sales from March 10 onward.

Formula
=SUMIFS(E2:E9,B2:B9,">="&DATE(2026,3,10))

Result: 1,510 (80 + 280 + 1,150). Join the operator and the date with &. Using DATE avoids problems with date formats in different countries.

Conditions in cells

With "West" in H1 and "Laptop" in H2:

Formula
=SUMIFS(E2:E9,C2:C9,H1,D2:D9,H2)

Change the cells and the total updates. Good for a small report where people choose the region.

Variants

SUMIF vs SUMIFS

SUMIF handles one condition and puts the range to add last: =SUMIF(C2:C9,"West",E2:E9) gives 2,680. SUMIFS handles one or more and puts the range to add first. Many people use SUMIFS for everything so they never mix up the order.

Wildcards

"Lap*" matches anything starting with Lap; "*top" anything ending with top; "?" stands for one character.

Not equal

"<>East" adds every row where the region is not East: 4,060 on this sheet.

OR conditions

SUMIFS only does AND. For West or East, add two SUMIFS: =SUMIFS(E2:E9,C2:C9,"West")+SUMIFS(E2:E9,C2:C9,"East"), which gives 4,280.

Common errors

The result is 0

A condition does not match: a spelling difference, a trailing space, or the condition range is the wrong column. Check one row by hand. The guide Excel formula not working has the full list.

#VALUE!

The ranges have different sizes, like E2:E9 with C2:C8. Make every range cover the same rows.

The arguments are in SUMIF order

=SUMIFS(C2:C9,"West",E2:E9) is SUMIF order inside SUMIFS and fails. The range to add comes first.

Too big because of > instead of >=

"From March 10" includes March 10, so use ">=". "After March 10" means ">".

When you ask AI for a SUMIFS, list every condition in the request and check that each one appears as a pair in the formula. A missing pair is the most common way a SUMIFS from AI ends up too big.

Practice

In the level "Write it yourself" you type SUMIFS and other formulas on a real looking sheet. Your formula is checked on the sheet you see and on changed copies, so it has to be right, not lucky. The levels before it show how to ask AI for the formula and how to fix one that is wrong.

Start step by step: Write it yourself

Free, in your browser, no sign up. Opens level “Write it yourself”.

FAQ

What is the difference between SUMIF and SUMIFS?

SUMIF takes one condition and the sum range goes last. SUMIFS takes one or more conditions and the sum range goes first.

Can SUMIFS use OR conditions?

Not directly. Add two or more SUMIFS together, one per alternative.

How many conditions can SUMIFS have?

Up to 127 pairs of range and condition in Excel, far more than you will need.

Does SUMIFS work in Google Sheets?

Yes, with the same syntax.

How do I use SUMIFS with dates?

Join an operator with a date: ">="&DATE(2026,3,10), or with a cell that holds the date: ">="&H1.

For learning only. Nothing here is legal, financial or tax advice. Sample AI replies in the practice are written in advance, and all names and numbers are made up.