+91-9914137278 [email protected]

When managing sales data in Excel, calculating total values by condition is a regular need. With the SUM and SUMIF functions, you can quickly total your sales — either generally or based on specific criteria like Department or State.

Let’s explore how both work using a simple dataset.

📊 Sample Data:

NameStateDepartmentSales (INR)
AnkitDelhiElectronic15,000
MeeraDelhiFashion12,000
RohanPunjabGrocery8,500
NehaDelhiHome & Living9,000
SureshGujaratSports11,200
PoojaDelhiBeauty10,500

🔹 1. Using the SUM Function (Basic Total)

If you want to simply calculate the total sales, use SUM.

Formula:

=SUM(D2:D7)

📌 What it does: Adds up all values in the Sales column (D2 to D7).

🔸 2. Using the SUMIF Function (Condition-Based Total)

✅ Use Case 1: Total Sales for Department = Electronic

Formula:

=SUMIF(C2:C7, "Electronic", D2:D7)

📌 Explanation:

  • C2:C7 → Range where condition is checked (Department)
  • “Electronic” → Criteria
  • D2:D7 → Sales values to sum if condition matches

🧾 Result: 15,000

✅ Use Case 2: Total Sales for State = Delhi and Department = Fashion

For multiple conditions, we use SUMIFS.

Formula:

=SUMIFS(D2:D7, B2:B7, "Delhi", C2:C7, "Fashion")

📌 Explanation:

  • D2:D7 → Sales values to sum
  • B2:B7, “Delhi” → Match Delhi in the State column
  • C2:C7, “Fashion” → Match Fashion in the Department column

🧾 Result: 12,000

📌 Key Differences – SUM vs SUMIF vs SUMIFS

FunctionUse CaseSupports Multiple Conditions
SUMTotal of a numeric range
SUMIFTotal based on one condition
SUMIFSTotal based on multiple filters

🎯 Final Thoughts:

Excel makes sales analysis quick and insightful when you know how to use the right formula:

  • ✅ Use SUM for simple totals
  • ✅ Use SUMIF for one condition
  • ✅ Use SUMIFS for complex, multi-condition filters

Example:

Pinterest
Instagram