top of page

You are learning Functions and Formulas in MS Excel

What does the SUMIF function do?

The SUMIF function in Excel is used to calculate the sum of cells that meet a single condition. It's a handy tool when you need to add up specific values within a range of data based on a certain criteria.

Here's a breakdown of how it works:

* Syntax: `=SUMIF(range, criteria, [sum_range])`
* Arguments:
* `range`: This is the cell range containing the values you want to evaluate. It must include numbers or cells with numbers.
* `criteria`: This defines the condition for selecting cells. It can be a number, text, expression, a cell reference containing the criteria, or a function that evaluates to TRUE or FALSE. Wildcards (* and ?) can be used for partial text matching.
* `[sum_range]`: This argument is optional. By default, it uses the `range` argument. However, you can specify a different range of cells to sum if the values you want to add reside elsewhere in your worksheet.

For example, let's say you have a list of sales data in column A and product names in column B. You want to find the total sales for a specific product, say "Apples." You can use the following formula:

`=SUMIF(B2:B10, "Apples", A2:A10)`

This formula will:

1. Look at the range B2:B10 (product names).
2. Check if each cell value in that range matches the criteria "Apples" (case-sensitive).
3. If a match is found in column B, the corresponding value in the same row from column A (sales data) will be included in the sum.
4. Finally, it will add up all the sales figures that meet the criteria ("Apples").

The SUMIF function is a great way to automate calculations and summarize data based on specific conditions within your Excel spreadsheets.

bottom of page