top of page

You are learning SUM in MS Excel

SUM with dates or text (functions like SUMPRODUCT)

Excel's built-in SUM function works primarily with numbers, but you can use it with dates and text under certain conditions. Here's a breakdown of how SUM handles dates and text, along with an alternative function (SUMPRODUCT) for more complex scenarios:

SUM with Dates:

* Dates as Numbers: Excel stores dates as sequential numbers. You can directly use the SUM function to add these numerical values if your dates are formatted as numbers. However, this might not be user-friendly for interpreting the results.
* Using SUMIF or SUMIFS: If you want to sum values based on date criteria (e.g., sum values for a specific date range), use the SUMIF or SUMIFS functions. These functions allow you to specify a date as criteria and add corresponding values in another range.

SUM with Text:

* Text Not Converted to Numbers: SUM ignores plain text entries. If you have text in your data that represents numbers, it won't be included in the sum unless you convert it to a numerical format.
* Using SUMIF or SUMIFS with Wildcards: If your text entries partially match a specific text criteria, you can use SUMIF or SUMIFS with wildcards (* and ?) to filter and sum values based on that criteria.

SUMPRODUCT for Complex Scenarios:

* Multiplying Corresponding Cells: SUMPRODUCT is a powerful function that multiplies corresponding cells from two or more arrays and then returns the sum of those products. It's particularly useful when you need to combine logical criteria (text or dates) with numerical data for summation.

Example:

Imagine you have a table with product names (text), sales dates (dates), and sales figures (numbers). You want to find the total sales for a specific product ("Apples") across all dates.

Here's how you could achieve this using different methods:

* Using SUMIF (if dates are formatted as numbers):

```excel
=SUMIF(A:A, "Apples", B:B) (* A:A - product names, B:B - sales figures)
```

* Using SUMPRODUCT:

```excel
=SUMPRODUCT((A:A="Apples")*(B:B)) (* A:A - product names, B:B - sales figures)
```

Both formulas will return the total sales for "Apples" products. SUMPRODUCT offers more flexibility for complex criteria involving text or dates.

In conclusion, SUM can handle basic date calculations and text criteria with SUMIF/SUMIFS. For more intricate scenarios involving text, dates, and numerical data, SUMPRODUCT provides a powerful tool for conditional summation.

bottom of page