SUMIF Function

The Excel SUMIF function is a powerful tool used to sum values in a range that meets a specific condition. This function is particularly useful for financial analysis, data analysis, and reporting tasks where you need to sum data based on criteria.

Syntax

FunctionDescription
SUMIF(range, criteria, [sum_range])Adds the cells specified by a given condition or criteria.

Parameters

  • range: The range of cells that you want to apply the criteria to.
  • criteria: The condition that must be met for a cell to be included in the sum.
  • sum_range (optional): The actual cells to sum. If omitted, Excel sums the cells specified in the range parameter.

Example

Let's consider an example to demonstrate how the SUMIF function works.

Task: We want to find the total sales for the "Fruit" category.

=SUMIF(B2:B6, "Fruit", C2:C6)

This formula will return 530, which is the total sales for products in the "Fruit" category.

Practice

Practice Exercise 1

Task: Calculate the total sales for products in the "Vegetable" category.

Practice Exercise 2

Task: Calculate the total sales for products that have sales greater than 100.

Solutions

A Solution to Practice Exercise 1

To calculate the total sales for products in the "Vegetable" category:

=SUMIF(B2:B6, "Vegetable", C2:C6)

This formula will return 320, which is the total sales for products in the "Vegetable" category.

A Solution to Practice Exercise 2

To calculate the total sales for products that have sales greater than 100:

=SUMIF(C2:C6, ">100", C2:C6)

This formula will return 770, which is the total sales for products with sales greater than 100.