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

Data Analysis

  • How to combine 2 or more chart types in a single chart in Excel
  • How To Load Analysis ToolPak in Excel
  • How to do a t-Test in Excel?
  • How To Filter Data in Excel
  • Excel Line Chart

References

  • How to get address of last cell in range in Excel
  • How to get last row in mixed data with blanks in Excel
  • Count unique text values with criteria
  • Multi-criteria lookup and transpose in Excel
  • How to calculate two-way lookup VLOOKUP in Excel Table

Data Validations

  • Prevent invalid data entering in specific cells
  • Excel Data validation unique values only
  • Excel Data validation number multiple 100
  • Excel Data validation specific characters only
  • Excel Data validation allow weekday only

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

  • How to use Excel NOT Function
  • Complete List of Excel Logical Functions, References and Examples
  • Invoice status with nested if in Excel
  • AND function: Description, Usage, Syntax, Examples and Explanation
  • OR function Examples in Excel

Date Time

  • Convert text date dd/mm/yy to mm/dd/yy in Excel
  • Get fiscal quarter from date in Excel
  • Convert date to month and year in Excel
  • Display the current date and time in Excel
  • Display Date is workday in Excel

Grouping

  • Group times into 3 hour buckets in Excel
  • Calculate conditional mode with criteria in Excel
  • Map inputs to arbitrary values in Excel
  • Group numbers with VLOOKUP in Excel
  • Group numbers at uneven intervals in Excel

General

  • List sheet names with formula in Excel
  • Find Most Frequently Occurring Word in Excel Worksheet
  • Count cells less than in Excel
  • How to calculate percent change in Excel
  • How to test a range for numbers in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning