SUMIF Function in Excel

Excel SUMIF Function – Complete Guide
📖 What is the SUMIF Function?

SUMIF is a conditional aggregation function that adds only those cells in a sum range where a corresponding cell in the criteria range satisfies a specified condition or criteria. It is categorised under Math & Trigonometry in Excel.

Unlike plain SUM which adds everything, SUMIF gives you targeted, filtered totals — for example: total sales for a specific product, total expenses in a particular category, or total dues from a specific customer. It supports text, numbers, dates, and wildcard criteria, making it extremely versatile for Indian accounting, MIS, and reporting workflows.

⚙️ Syntax & Arguments
=SUMIF( range, criteria, [sum_range] )

range        → Required. The cells to evaluate against the criteria (e.g., A2:A100).
criteria     → Required. The condition to match — number, text, expression, or wildcard.
[sum_range]  → Optional. Actual cells to sum. If omitted, Excel sums the 'range' itself.

── Criteria formats supported ─────────────────────────────
=SUMIF(A2:A20,"North",B2:B20) → Exact text match
=SUMIF(C2:C20,">50000",D2:D20) → Numeric comparison
=SUMIF(A2:A20,"*Ltd*",B2:B20) → Wildcard: contains "Ltd"
=SUMIF(A2:A20,"<>"&"",B2:B20) → Non-blank cells only
ℹ️ Key rule: When sum_range is provided, it must be the same size as range (or Excel auto-expands it). Criteria text and wildcards must be enclosed in double quotes. Use & to join a variable: =SUMIF(A:A,">"&E1,B:B)
📊 Example 1 — Zone-wise Sales Total
Basic Use Case

A Sales Manager has daily transaction data with Region and Amount columns. She wants the total sales for the North Zone only.

A — RegionB — SalespersonC — Sales (₹)
NorthAmit Sharma1,45,000
SouthPriya Nair98,000
NorthRajiv Gupta2,10,000
EastSunita Das76,500
NorthKavita Joshi1,87,000
WestMohan Pillai1,32,000
North Zone Total₹ 5,42,000
Formula in E2 → =SUMIF(A2:A7,"North",C2:C7)
✅ Result: ₹ 5,42,000
📊 Example 2 — Conditional Expense Tracking with Cell Reference Criteria
Advanced / Practical Use Case

An Accounts team tracks departmental expenses. The Finance Head wants to pull the total expense for any selected department dynamically — using a dropdown cell reference as criteria instead of a hardcoded text string, making the report reusable.

A — DepartmentB — Expense HeadC — Amount (₹)
MarketingDigital Ads3,40,000
HRRecruitment1,20,000
MarketingEvents & PR2,80,000
OperationsLogistics4,50,000
HRTraining95,000
MarketingContent1,60,000
Marketing Total (via F1)₹ 7,80,000
Cell F1 contains the department name (e.g., "Marketing")
Formula in F2 → =SUMIF(A2:A7,F1,C2:C7)
✅ Result: ₹ 7,80,000 (changes dynamically with F1)
💡 Key Applications
  • Finance Summing expenses by ledger head (Rent, Salary, Marketing) from a multi-category expense register for P&L preparation.
  • Tax Totalling GST-eligible transactions by HSN code or tax slab (5%, 12%, 18%, 28%) for GSTR filing reconciliation.
  • Sales Computing target-vs-actual by region or product category from a flat sales dump exported from CRM / Tally.
  • Audit Summing transactions above a threshold (e.g., all payments > ₹2,00,000) for high-value transaction review.
  • HR Calculating total salary outgo for a specific grade, designation, or department from payroll master data.
  • Retail Getting category-wise stock value from inventory (e.g., all items in "Electronics") using product category column.
⚠️ Common Mistakes to Avoid
1. Forgetting Double Quotes Around Text Criteria
Writing =SUMIF(A:A, North, B:B) without quotes causes a #NAME? or wrong-value error because Excel tries to interpret "North" as a named range.
✔ Fix: Always wrap text criteria in double quotes: =SUMIF(A:A,"North",B:B)
2. Mismatched Range and Sum_Range Sizes
Using =SUMIF(A1:A10,"North",B1:B5) where the ranges are different sizes causes Excel to misalign cells and return incorrect totals silently.
✔ Fix: Always ensure range and sum_range have the exact same number of rows: =SUMIF(A1:A10,"North",B1:B10)
3. Using SUMIF When Multiple Conditions Are Needed
Trying to filter by both Region = "North" AND Product = "Laptop" with SUMIF alone is impossible — it only handles one condition and will return wrong totals.
✔ Fix: Switch to SUMIFS for multiple conditions: =SUMIFS(C:C,A:A,"North",B:B,"Laptop")
4. Hardcoding Criteria Instead of Using Cell References
Writing =SUMIF(A:A,"North",B:B) directly in 12 separate cells for 12 regions means manually updating formulas every time a region name changes.
✔ Fix: Use a cell reference: =SUMIF($A:$A,E2,$B:$B) and drag down — changes to E2 propagate automatically.
5. Comparison Operators Not Inside Quotes
Writing =SUMIF(C:C, >50000, D:D) without quotes around the operator causes a formula error — Excel cannot parse bare comparison operators as criteria.
✔ Fix: Enclose the full expression in quotes: =SUMIF(C:C,">50000",D:D) or use ">"&E1 for dynamic values.
Scroll to Top