Ravindra BagaleCourses & study guides मराठी Track your progress

3. Formulas and Functions

3.2 SUM, SUMIF and SUMIFS

SUM, SUMIF and SUMIFS with example — in 30 seconds

What: SUMIFS adds only the rows that pass all your conditions.

Why: "Total sales" mixes cancelled orders with real ones. Managers want delivered sales for one city.

Tiny example: Pune has 4 orders worth ₹544, but only 3 were delivered: ₹324. =SUMIFS(G2:G11,C2:C11,"Pune",I2:I11,"Delivered")

First look at the data (before → after):

SUM, SUMIF and SUMIFS with example: before and after tables, fictional QuickKart Maharashtra data

Expected result — Results on the ten rows

Question Answer (₹)
All orders (SUM) 2,870
Pune, any status (SUMIF) 544
Pune, Delivered (SUMIFS) 324

About this data: Teaching sample for a fictional shop “Maple Bakery Co”. Figures and names (e.g. Neha Shah) are made up for this lesson on sum sumif and sumifs.

Before table and formula as text

Before — Pune rows of the mini dataset

A: Order ID C: City G: Amount I: Status
QKT-1001 Pune 64 Delivered
ZBK-1003 Pune 110 Delivered
QKT-1006 Pune 150 Delivered
QKT-1009 Pune 220 Cancelled

About this data: Demo table only — not real customer or company data. Built to practise sum sumif and sumifs.

Formula / click path

=SUM(G2:G11)
=SUMIF(C2:C11,"Pune",G2:G11)
=SUMIFS(G2:G11,C2:C11,"Pune",I2:I11,"Delivered")

Do it step by step:

  1. Click an empty cell, for example K2.
  2. Type =SUMIFS( and select the amounts G2:G11 first.
  3. Add the first pair: C2:C11, then "Pune".
  4. Add the second pair: I2:I11, then "Delivered". Close the bracket.
  5. Press Enter. You should see 324.
Function Syntax
SUM =SUM(number1, [number2], …)
SUMIF =SUMIF(range, criteria, [sum_range])
SUMIFS =SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], …)

About this data: Made-up rows so you can copy the pattern for sum sumif and sumifs. Currencies may use ₹, £, € or $.

Criteria (निकष – कोणत्या ओळी मोजायच्या याची अट) can be text ("Pune"), numbers (">15"), a cell (K1), or joined (">"&K1). Wildcards: * any characters, ? one character.

Question Formula Result
Total sales =SUM(G2:G11) 2,870
Pune sales =SUMIF(C2:C11,"Pune",G2:G11) 544
Pune sales, Delivered only =SUMIFS(G2:G11,C2:C11,"Pune",I2:I11,"Delivered") 324
Sales of Fruits =SUMIFS(G2:G11,E2:E11,"Fruits") 600
ZipBasket sales =SUMIFS(G2:G11,A2:A11,"ZBK*") 537
Sales 03-11 to 05-11 =SUMIFS(G2:G11,B2:B11,">="&DATE(2026,11,3),B2:B11,"<="&DATE(2026,11,5)) 2,031

About this data: Fictional worksheet used in class. Safe to edit; nothing here is live production data.

Steps in Excel

  1. AutoSum: select the cell below the Amount column › Home › Editing › AutoSum (Alt + =) › Enter.
  2. Build a city summary: list the six cities in K2:K7. In L2: =SUMIFS($G$2:$G$11,$C$2:$C$11,K2) › copy down.
  3. Check: =SUM(L2:L7) must equal the total 2,870.

Ravindra Bagale's Tip

The order of arguments in SUMIF and SUMIFS is reversed – in SUMIF, sum_range comes last; in SUMIFS, it comes first. Many students get confused here. I always tell them to use only SUMIFS – it works even with one condition, and you don't have to remember the order. And always check that the summary total matches the raw total.

Practice task

Using SUMIFS, find: QuickKart sales in Nashik, sales of orders taking more than 12 minutes, and sales where Category is not Fruits ("<>Fruits").

Loading practice tasks...

  1. Total of all orders (Easy): Find the total of the Amount column for all 10 orders.
  2. Total sales of Pune (Easy): Find the total Amount for orders where City is "Pune".
  3. Bank: total money moved (Easy): On the Bank sheet, find the total of the Amount (₹) column.
  4. Bank: total deposits (Easy): On the Bank sheet, find the total Amount (₹) where Type is "Deposit".
  5. Total of delivered orders (Medium): Find the total Amount of orders where Status is "Delivered".
  6. Big orders only (Medium): Find the total of the Amount values that are above ₹200.
  7. Bank: big transactions (Medium): On the Bank sheet, find the total of the Amount (₹) values that are above ₹10,000.
  8. Pune and Delivered (Hard): Find the total Amount for orders where City is "Pune" and Status is "Delivered".
  9. QuickKart delivered sales (Hard): Find the total Amount for orders where Platform is "QuickKart" and Status is "Delivered".
  10. Bank: Pune deposits (Hard): On the Bank sheet, find the total Amount (₹) where Branch is "Pune" and Type is "Deposit".

Quick revision cards

Three standalone cards. Each one explains the idea with its own example. Scan the QR to open this lesson.

Revision card: SUM: add every order value, whatever the city or status. Example data table with What is the total value of all five orders?: ₹634; Does SUM leave out the cancelled order?: ₹414 for delivered orders; How do I check the total?: ₹220, and ₹414 + ₹220 = ₹634.
Card 1: SUM: add every order value, whatever the city or status · Download PNG
Revision card: SUMIF: add the order values that meet one condition. Example data table with What is the total order value for Pune?: ₹544 (64 + 110 + 150 + 220); What is the total value of delivered orders?: ₹414 (64 + 110 + 150 + 90); What is the total of orders above ₹100?: ₹480 (110 + 150 + 220).
Card 2: SUMIF: add the order values that meet one condition · Download PNG
Revision card: SUMIFS: add order values that meet all conditions. Example data table with What is the value of delivered Pune orders?: ₹324 (64 + 110 + 150); What is the total value of cancelled Pune orders?: ₹220; How does SUMIFS order differ from SUMIF?: ₹544, which is ₹324 + ₹220.
Card 3: SUMIFS: add order values that meet all conditions · Download PNG