Thursday, 30 January 2025

sumifs

 The SUMIFS function in Excel is used to sum values in a range that meet multiple criteria. Below are 10 examples of how to use the SUMIFS function, including sample data and formulas.


Sample Data

Assume the following data is in the range A1:D10:

ProductRegionSalespersonSales
AppleNorthJohn100
BananaSouthJane200
AppleSouthJohn150
OrangeNorthJane300
BananaNorthJohn250
AppleNorthJane400
OrangeSouthJohn350
BananaSouthJane500
AppleSouthJane600
OrangeNorthJohn450

Examples of SUMIFS

  1. Sum sales for "Apple"
    Formula:
    =SUMIFS(D2:D10, A2:A10, "Apple")
    Result: 1250 (100 + 150 + 400 + 600)

  2. Sum sales for "Apple" in the "North" region
    Formula:
    =SUMIFS(D2:D10, A2:A10, "Apple", B2:B10, "North")
    Result: 500 (100 + 400)

  3. Sum sales for "John" in the "South" region
    Formula:
    =SUMIFS(D2:D10, C2:C10, "John", B2:B10, "South")
    Result: 500 (150 + 350)

  4. Sum sales for "Banana" or "Orange"
    Formula:
    =SUMIFS(D2:D10, A2:A10, "Banana") + SUMIFS(D2:D10, A2:A10, "Orange")
    Result: 2150 (200 + 250 + 500 + 300 + 350 + 450)

  5. Sum sales for "Jane" in the "North" region for "Apple"
    Formula:
    =SUMIFS(D2:D10, C2:C10, "Jane", B2:B10, "North", A2:A10, "Apple")
    Result: 400

  6. Sum sales greater than 300 for "Orange"
    Formula:
    =SUMIFS(D2:D10, A2:A10, "Orange", D2:D10, ">300")
    Result: 800 (350 + 450)

  7. Sum sales for "Banana" in the "South" region with sales less than 500
    Formula:
    =SUMIFS(D2:D10, A2:A10, "Banana", B2:B10, "South", D2:D10, "<500")
    Result: 200

  8. Sum sales for "John" or "Jane" in the "North" region
    Formula:
    =SUMIFS(D2:D10, C2:C10, "John", B2:B10, "North") + SUMIFS(D2:D10, C2:C10, "Jane", B2:B10, "North")
    Result: 1200 (100 + 250 + 400 + 450)

  9. Sum sales for "Apple" or "Banana" in the "South" region
    Formula:
    =SUMIFS(D2:D10, A2:A10, "Apple", B2:B10, "South") + SUMIFS(D2:D10, A2:A10, "Banana", B2:B10, "South")
    Result: 1450 (150 + 600 + 200 + 500)

  10. Sum sales for "Orange" with sales between 300 and 500
    Formula:
    =SUMIFS(D2:D10, A2:A10, "Orange", D2:D10, ">=300", D2:D10, "<=500")
    Result: 1100 (300 + 350 + 450)


Key Notes

  • The SUMIFS function syntax is:
    =SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

  • You can use logical operators like ><>=<=, and <> in criteria.

  • Ensure the ranges (sum_rangecriteria_range1, etc.) are of the same size.

No comments:

Post a Comment