How to Sum Data by Month Ignore Year in Excel

Sometimes we may want to sum data by month but ignoring the year. For example, if we want to investigate which month has the top sales among several years, we may sum data by month but ignoring the year information. Actually, we can use formula based on SUMPRODUCT function and MONTH function to sum data for this instance. In this tutorial, we will introduce the usage of SUMPRODUCT function and MONTH function with simple description, formula explanation and necessary screenshots, also teach you the way to sum data by month ignoring year with above two functions.

EXAMPLE

Obviously, we have data for October in year 2020 and year 2019. We want to sum all items for October.

FORMULA:

In D2, enter the formula =SUMPRODUCT((MONTH($A$2:$A$11)=10)*$B$2:$B$11).

HOW THIS FORMULA WORKS:

Inside of SUMPRODUCT function, we also use MONTH function in this instance. For MONTH function, the syntax is MONTH(serial_number). For example, if A1 is 01/01/2020, then MONTH(A1) returns 1. This function returns the month serial number. So, if we want to find out date in date range belongs to October, we need to use MONTH($A$2:$A$11)=10 here, thus we can get an array as result.

Enter =(MONTH(A2:A11)=10) in D2 temporally. We get TRUE here, actually it only returns the first value of the array.

Move focus in formula bar, then press F9 (on different version maybe Fn+F9). We can see the array is listed properly.

Update formula to =–(MONTH(A2:A11)=10). Then TRUE or FALSE will convert to number properly.

Move focus in formula bar, then press F9.

For SUMPRODUCT function, the syntax is SUMPRODUCT(array1,[array2],[array3],…). After learning MONTH function, we all know that MONTH($A$2:$A$11)=10 it will return an array. As SUMPRODUCT function can returns the sum of an array, and $B$2:$B$11 is another array for saving amount, and data in this range is also the match value for each date in A column. so here we can use =SUMPRODUCT ((MONTH($A$2:$A$11)=10)*$B$2:$B$11) to sum data by month October properly. It equals to {1;1;1;0;0;0;0;1;1;1}*{100;200;100;300;150;100;50;100;50;100}, equivalent to =SUMPRODUCT({100;200;100;0;0;0;0;100;50;100}).

RESULT:

Now we can sum data by month ignoring the year properly.     

Related Functions


  • Excel SUMPRODUCT function
    The Excel SUMPRODUCT function multiplies corresponding components in the given one or more arrays or ranges, and returns the sum of those products. The syntax of the SUMPRODUCT function is as below:= SUMPRODUCT (array1,[array2],…)…
  • Excel MONTH function
    The Excel MONTH function returns the month of a date represented by a serial number. And the month is an integer number from 1 to 12. The syntax of the MONTH function is as below:=MONTH (serial_number)…
Related Posts

Case Sensitive Lookup with SUMPRODUCT and EXACT

Today, we will show you how to use SUMPRODUCT and EXACT to perform a case sensitive exact match. In this article, we provide a simple example to calculate bonus for employees whose names are case-sensitive. If you meet similar scenarios ...

Average per Week by Formula in Excel
Average per Week 1

We usually apply AVERAGE function or relevant functions to return average directly in Excel worksheet. But in some situations, only applying average relevant functions cannot figure out our problem. Sometimes we can create a formula with functions and mathematical operation ...

How to Sum if Equal to Many Items or A Range in Excel
How to Sum if Equal to Many Items 12

If we want to sum numbers from a range with criteria, we often select SUMIF of SUMIFS functions as the first choice to create a formula. The criteria can be a number or an array or a collection of some ...

How to Sum if Equal to X or Y in Excel
How to Sum if Equal to X or Y 19

In daily work, if we want to sum numbers from a range, and only sum the numbers which being equal to X or Y in the range, we can create a formula with Excel build-in functions to get the result. ...

How To Sum the Largest N Values in Excel

Sometimes we may want to sum the largest N numbers or top N numbers in a range. In this article, we will show you the method of “SUM the Largest N Numbers” by a simple formula which consist of SUMPRODUCT ...

How to Sum for Cell Contains Formula Only in Excel
How to Sum for Cell Contains Formula Only in Excel 9

Sometimes values are created by formulas in cells. If we want to sum values which are created by formulas from a range, but some values which are hardcoded also list in the same range, how can we filter out matched ...

How to Sum the Smallest N Values in Excel
How to Sum the Smallest N Values in Excel 15

Sometimes we may want to sum the first smallest N numbers in a range in Excel. In this article, we will show you the method of “SUM the Smallest N Numbers” by a simple formula which consist of SUMPRODUCT and ...

How to Sum by SUMPRDUCT with One Specific Criteria Multiple Columns in Excel
How to Sum by SUMPRDUCT with One Specific Criteria Multiple Columns in Excel1

Sometimes we may meet the case that to sum numbers based on one specific criteria. In this article, we will show you the method to resolve this problem by formula with the help of Excel SUMPRODUCT function. SUMPRODUCT can filter ...

How to Sum by SUMPRDUCT with Specific Criteria in Excel
How to Sum by SUMPRDUCT with Specific Criteria in Excel 15

Sometimes we may meet the case that to sum numbers based on two or more specific criteria. In this article, we will show you the method to resolve this problem by formulas with the help of Excel SUMPRODUCT function. SUMPRODUCT ...

How to Count Unique Numeric Values in a Range in Excel
count unique numberic values7

This post will guide you how to count unique numeric values in the given range in Excel 2013/2016 or Excel office 365. How do I count the unique numeric values in a list of data with some duplicate values using ...

Sidebar