Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to sum a total in multiple Excel tables
  • How to Create Area Chart in Excel
  • How to calculate average last N values in a table in Excel
  • How to calculate current stock or inventory in Excel
  • Number and Text Filters Examples in Excel

References

  • How to use Excel FORMULATEXT function
  • How to get first column number in range in Excel
  • How to get last column number in range in Excel
  • Count rows that contain specific values in Excel
  • How to use Excel ROWS Function

Data Validations

  • Excel Data validation only dates between
  • Excel Data validation date in next 30 days
  • How To Create Drop-down List in Excel
  • Excel Data validation must not contain
  • Excel Data validation must begin with

Sum by month ignore year in Excel

by

This tutorial shows how to Sum by month ignore year in Excel using the example below;

Formula

=SUMPRODUCT((MONTH(dates)=month)*amounts)

Explanation

To sum data by month, ignoring year, you can use a formula based on the SUMPRODUCT and MONTH functions. In the example shown, the formula in H6 is:

=SUMPRODUCT((MONTH(dates)=3)*amounts)

The result is a total of all sales in March, ignoring year.

How this formula works

This data set contains over 2900 records, and the formula above uses two named ranges:

dates = B5:B2932
amounts =  E5:E2932

Inside the SUMPRODUCT function, the MONTH function is used to extract the month number for every date in the data set, and compare it with the number 3:

(MONTH(dates)=3)

If we assume a small data set listing 3 dates each in January, February, and March (in that order), the result would be an array containing nine numbers like this:

{1;1;1;2;2;2;3;3;3}

where each number is the “month number” for a date.  When the values are compared to 3, the result is an array like this:

{FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;TRUE;TRUE;TRUE}

This array is then multiplied by the amount values associated with each March date. If we assume all nine amounts are equal to 100, the operation looks like this:

{0;0;0;0;0;0;1;1;1} * {100;100;100;100;100;100;100;100;100}

Notice the math operation changes the TRUE FALSE values into ones and zeros. After multiplication, we have a single array in SUMPRODUCT:

=SUMPRODUCT({0;0;0;0;0;0;100;100;100})

Note the only surviving amounts are associated with March, the rest are zero.

Finally, SUMPRODUCT returns the sum of all items – 300 in the abbreviated example above, and 25,521 in the screenshot with actual data.

2. Count by month ignoring year

To get a count by month ignoring year, you can use SUMPRODUCT like this:

=SUMPRODUCT(--(MONTH(dates)=3))

Average by month ignoring year

To calculate and average by month ignoring year, you combine the two SUMPRODUCT formulas above like this:

=SUMPRODUCT((MONTH(dates)=3)*amounts)/SUMPRODUCT(--(MONTH(dates)=3))

formula

=SUMPRODUCT((MONTH(dates)=month)*amounts)

Explanation

To sum data by month, ignoring year, you can use a formula based on the SUMPRODUCT and MONTH functions. In the example shown, the formula in H6 is:

=SUMPRODUCT((MONTH(dates)=3)*amounts)

The result is a total of all sales in March, ignoring year.

How this formula works

This data set contains over 2900 records, and the formula above uses two named ranges:

dates = B5:B2932
amounts =  E5:E2932

Inside the SUMPRODUCT function, the MONTH function is used to extract the month number for every date in the data set, and compare it with the number 3:

(MONTH(dates)=3)

If we assume a small data set listing 3 dates each in January, February, and March (in that order), the result would be an array containing nine numbers like this:

{1;1;1;2;2;2;3;3;3}

where each number is the “month number” for a date.  When the values are compared to 3, the result is an array like this:

{FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;TRUE;TRUE;TRUE}

This array is then multiplied by the amount values associated with each March date. If we assume all nine amounts are equal to 100, the operation looks like this:

{0;0;0;0;0;0;1;1;1} * {100;100;100;100;100;100;100;100;100}

Notice the math operation changes the TRUE FALSE values into ones and zeros. After multiplication, we have a single array in SUMPRODUCT:

=SUMPRODUCT({0;0;0;0;0;0;100;100;100})

Note the only surviving amounts are associated with March, the rest are zero.

Finally, SUMPRODUCT returns the sum of all items – 300 in the abbreviated example above, and 25,521 in the screenshot with actual data.

3. Count by month ignoring year

To get a count by month ignoring year, you can use SUMPRODUCT like this:

=SUMPRODUCT(--(MONTH(dates)=3))

Average by month ignoring year

To calculate and average by month ignoring year, you combine the two SUMPRODUCT formulas above like this:

=SUMPRODUCT((MONTH(dates)=3)*amounts)/SUMPRODUCT(--(MONTH(dates)=3))

formula

=SUMPRODUCT((MONTH(dates)=month)*amounts)

Explanation

To sum data by month, ignoring year, you can use a formula based on the SUMPRODUCT and MONTH functions. In the example shown, the formula in H6 is:

=SUMPRODUCT((MONTH(dates)=3)*amounts)

The result is a total of all sales in March, ignoring year.

How this formula works

This data set contains over 2900 records, and the formula above uses two named ranges:

dates = B5:B2932
amounts =  E5:E2932

Inside the SUMPRODUCT function, the MONTH function is used to extract the month number for every date in the data set, and compare it with the number 3:

(MONTH(dates)=3)

If we assume a small data set listing 3 dates each in January, February, and March (in that order), the result would be an array containing nine numbers like this:

{1;1;1;2;2;2;3;3;3}

where each number is the “month number” for a date.  When the values are compared to 3, the result is an array like this:

{FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;TRUE;TRUE;TRUE}

This array is then multiplied by the amount values associated with each March date. If we assume all nine amounts are equal to 100, the operation looks like this:

{0;0;0;0;0;0;1;1;1} * {100;100;100;100;100;100;100;100;100}

Notice the math operation changes the TRUE FALSE values into ones and zeros. After multiplication, we have a single array in SUMPRODUCT:

=SUMPRODUCT({0;0;0;0;0;0;100;100;100})

Note the only surviving amounts are associated with March, the rest are zero.

Finally, SUMPRODUCT returns the sum of all items – 300 in the abbreviated example above, and 25,521 in the screenshot with actual data.

4. Count by month ignoring year

To get a count by month ignoring year, you can use SUMPRODUCT like this:

=SUMPRODUCT(--(MONTH(dates)=3))

5. Average by month ignoring year

To calculate and average by month ignoring year, you combine the two SUMPRODUCT formulas above like this:

=SUMPRODUCT((MONTH(dates)=3)*amounts)/SUMPRODUCT(--(MONTH(dates)=3))

Post navigation

Previous Post:

How to use Excel CHOOSE Function

Next Post:

Customize Ribbon In Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • OR function: Description, Usage, Syntax, Examples and Explanation
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation
  • IF function: Description, Usage, Syntax, Examples and Explanation
  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • How to return blank in place of #DIV/0! error in Excel

Date Time

  • Convert Excel time to decimal hours in Excel
  • How to calculate next anniversary date or birthday in Excel
  • Steps to create Dynamic calendar grid in Excel
  • How to calculate next day of week in Excel
  • Calculate years between dates in Excel

Grouping

  • Map text to numbers in Excel
  • If cell contains one of many things in Excel
  • Group times into unequal buckets in Excel
  • Running count group by n size in Excel
  • Calculate conditional mode with criteria in Excel

General

  • How to calculate percentage discount in Excel
  • How to generate random number between two numbers in Excel
  • Excel Default Templates
  • Count cells that do not contain errors in Excel
  • How to make excel worksheets print on one page?
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning