SUMIF & SUMIFS function



๐Ÿ“Š Excel Functions: SUMIF and SUMIFS


โœ… 1. SUMIF Function

๐Ÿ”ง Purpose:

SUMIF is used to sum values based on a single condition.


๐Ÿ“Œ Syntax: SUMIF(range, criteria, [sum_range])


๐Ÿ“‹ Parameters:

  • range โ€“ The range of cells to evaluate against the criteria.

  • criteria โ€“ The condition that determines which cells to sum.

  • sum_range (optional) โ€“ The actual cells to sum. If omitted, Excel sums the cells in the range.


๐Ÿงพ Example:

๐Ÿ—‚๏ธ Data:

A (Product)B (Sales)
Apple100
Banana150
Apple200

๐ŸŽฏ Goal:

Sum the sales of "Apple".

โœ… Formula: =SUMIF(A2:A4, "Apple", B2:B4)

๐Ÿ“ค Result:

300


๐Ÿชœ Step-by-Step:

  1. Type the function =SUMIF(.

  2. Select the range to evaluate (e.g., A2:A4).

  3. Type the condition (e.g., "Apple").

  4. Select the range to sum (e.g., B2:B4).

  5. Press Enter to get the result.


โœ… 2. SUMIFS Function

๐Ÿ”ง Purpose:

SUMIFS is used to sum values based on multiple conditions.


๐Ÿ“Œ Syntax: 

SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

๐Ÿ“‹ Parameters:

  • sum_range โ€“ The range of cells to add.

  • criteria_range1 โ€“ The first range to evaluate.

  • criteria1 โ€“ The condition for the first range.

  • [criteria_range2, criteria2]... โ€“ Additional ranges and criteria (optional).


๐Ÿงพ Example:

๐Ÿ—‚๏ธ Data:

A (Product)B (Region)C (Sales)
AppleEast100
BananaWest150
AppleEast200
AppleWest100

๐ŸŽฏ Goal:

Sum the sales of "Apple" in the "East" region.

โœ… Formula:=SUMIFS(C2:C5, A2:A5, "Apple", B2:B5, "East")

๐Ÿ“ค Result: 300


๐Ÿชœ Step-by-Step:

  1. Type the function =SUMIFS(.

  2. Select the sum_range (e.g., C2:C5).

  3. Select the first criteria_range (e.g., A2:A5) and set the criteria (e.g., "Apple").

  4. Select the second criteria_range (e.g., B2:B5) and set the criteria (e.g., "East").

  5. Press Enter.


๐Ÿ“ Tips & Notes

  • Wildcards: Use * for any number of characters, ? for a single character in text-based criteria.

  • Comparison Operators: You can use operators like ">100" or "<200".

  • SUMIFS is more powerful than SUMIF because it can handle multiple conditions.