Math & Trig Excel 2007 ◉ 26 views

=SUMIFS()

How to use the SUMIFS function in Excel, one of Excel’s math and trig functions, to add arguments that meet multiple criteria.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016Excel Web App
=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Hover argument names in the table for details.
Output typeNumber
Popularity90 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =SUMIFS() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
📥 Download SUMIFS.xlsx ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

🧠 🧠 Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
sum_range Any type Required The range of cells to sum.
criteria_range1 Any type Required The range that is tested using Criteria1.Criteria_range1 and Criteria1 set up a search pair whereby a range is searched for specific criteria. Once items in the range are found, their corresponding values in Sum_range are added.
criteria1 Any type Required The criteria that defines which cells in Criteria_range1 will be added. For example, criteria can be entered as 32, ">32", B4, "apples", or "32".
criteria_range2, criteria2 Number Optional Additional ranges and their associated criteria. You can enter up to 127 range/criteria pairs.

▣ Examples

▦ Data
CellValue
A2 Quantity Sold
B2 Product
C2 Salesperson
A3 5
B3 Apples
C3 Tom
A4 4
B4 Apples
C4 Sarah
A5 15
B5 Artichokes
C5 Tom
A6 3
B6 Artichokes
C6 Sarah
A7 22
B7 Bananas
C7 Tom
A8 12
B8 Bananas
C8 Sarah
A9 10
B9 Carrots
C9 Tom
A10 33
B10 Carrots
C10 Sarah
A11 Quantity Sold
B11 Product
C11 Salesperson
A12 5
B12 Apples
C12 Tom
A13 4
B13 Apples
C13 Sarah
A14 15
B14 Artichokes
C14 Tom
A15 3
B15 Artichokes
C15 Sarah
A16 22
B16 Bananas
C16 Tom
A17 12
B17 Bananas
C17 Sarah
A18 10
B18 Carrots
C18 Tom
A19 33
B19 Carrots
C19 Sarah
Adds the number of products that begin with A and were sold by Tom. It uses the wildcard character * in Criteria1, "=A*" to look for matching product names in Criteria_range1 B2:B9, and looks for the name "Tom" in Criteria_range2 C2:C9. It then adds the numbers in Sum_range A2:A9 that meet both conditions. The result is 20. =SUMIFS(A2:A9, B2:B9, "=A*", C2:C9, "Tom")
Adds the number of products that aren't bananas and are sold by Tom. It excludes bananas by using <> in the Criteria1, "<>Bananas", and looks for the name "Tom" in Criteria_range2 C2:C9. It then adds the numbers in Sum_range A2:A9 that meet both conditions. The result is 30. =SUMIFS(A2:A9, B2:B9, "<>Bananas", C2:C9, "Tom")

✦ Tips

  • 0 (Zero) is shown instead of the expected result.: Make sure Criteria1,2 are in quotation marks if you are testing for text values, like a person's name.
  • The result is incorrect when Sum_range has TRUE or FALSE values.: TRUE and FALSE values for Sum_range are evaluated differently, which may cause unexpected results when they're added.Cells in Sum_range that contain TRUE evaluate to 1. Those that contain FALSE evaluate to 0 (zero).
  • Use wildcard characters.: Using wildcard characters like the question mark (?) and asterisk (*) in criteria1,2 can help you find matches that are similar but not exact.A question mark matches any single character. An asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) in front of the question mark.For example, =SUMIFS(A2:A9, B2:B9, "=A*", C2:C9, "To?") will add all instances with name that begin with "To" and ends with a last letter that could vary.
  • Understand the difference between SUMIF and SUMIFS.: The order of arguments differ between SUMIFS and SUMIF. In particular, the sum_range argument is the first argument in SUMIFS, but it is the third argument in SUMIF. This is a common source of problems using these functions.If you're copying and editing these similar functions, make sure you put the arguments in the correct order.
  • Use the same number of rows and columns for range arguments.: The Criteria_range argument must contain the same number of rows and columns as the Sum_range argument.

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.