# How to Do SUMIF by Month and Year in Excel (7 Quick Ways)

Get FREE Advanced Excel Exercises with Solutions!

If you are looking for some of the easiest ways to do SUMIF by month and year, then you are in the right place. For calculating records of sales or expenditures or these types of calculations based on a month of a year Excel is very helpful.
To do these tasks in Excel you have to follow some methods so that you can do them effectively. After going through this article, you will be able to sum up values by month and year easily.

## SUMIF by Month and Year: 7 Quick Ways

In the following data table, I have some records of sales based on some dates in Excel. To add up the sales based on a month of a year I will use the following example to explain the possible methods. Here, the date format is mm-dd-yyyy. I have used Microsoft Excel 365 version for this calculation. However, you can use any other version at your convenience.

### Method-1: Use of SUMIFS Function to Do SUMIF by Month and Year

If you want to add the sales of January 2019 then you can use the SUMIFS function and the DATE function.

Now, follow the steps given below.

Steps:
âž¤ Firstly, select the output Cell G10.
âž¤ Secondly, type the following formula:

`=SUMIFS(D5:D14,C5:C14,">="&DATE(2019,1,1),C5:C14,"<="&DATE(2019,1,31))`

Formula Breakdown

• Here, D5:D14 is the range of Sales, and C5:C14 is the criteria range.
• `">="&DATE(2019,1,1) `is the first criterion where DATE will return the first date of a month.
• `"<="&DATE(2019,1,31) `is the second criterion where DATE will return the last date of a month.

âž¤ Then, press ENTER.

Result:
Now, you will get the sum of sales for January 2019.

### Method-2: Using SUMIFS Function to Sum up Values Based on a Certain Period

You can get the sum of sales for a certain period like from January 2019 to February 2020 by using the SUMIFS function and the DATE function.

Steps:
âž¤ Firstly, select the output Cell G10.
âž¤ Secondly, type the following formula:

`=SUMIFS(D5:D14,C5:C14,">="&DATE(2019,1,1),C5:C14,"<="&DATE(2020,2,29))`

Formula Breakdown

• Here, D5:D14 is the range of Sales, and C5:C14 is the criteria range.
• `">="&DATE(2019,1,1)` is the first criterion where DATE will return the first date of a period.
• `"<="&DATE(2020,2,29) `is the second criterion where DATE will return the last date of a period.

âž¤ Subsequently, press ENTER.

Result:
Then, you will get the sum of sales for the period of January 2019 to February 2020.

### Method-3: Combining SUMIFS & EOMONTH Functions

You can get the sum of sales for a month or a year using the SUMIFS function and the EOMONTH function.

Steps:
âž¤ First, select the output Cell H7.
âž¤ Then, type the following formula:

`=SUMIFS(\$D\$5:\$D\$14,\$C\$5:\$C\$14,">="&G7,\$C\$5:\$C\$14,"<="&EOMONTH(G7,0))`

Formula Breakdown

• \$D\$5:\$D\$14 is the range of Sales, \$C\$5:\$C\$14 is the criteria range.
• `">="&G7 `is the first criterion where G7 is the first date of a month.
• `"<="&EOMONTH(G7,0) `is the second criterion where EOMONTH will return the last date of a month.

âž¤ After that, press ENTER.
âž¤ Then, drag down the Fill Handle icon.

Result:
Then, you will get the sum of sales for different months of the year.

### Method-4: Merging SUMPRODUCT, MONTH & YEAR Functions to Add Values

If you want to get the sum of sales for a month of a year then you can use the SUMPRODUCT function, the MONTH function, and the YEAR function.

Steps:
âž¤ Firstly, select the output Cell G10.
âž¤ Secondly, type the following formula:

`=SUMPRODUCT((MONTH(C5:C14)=2)*(YEAR(C5:C14)=2020)*(D5:D14))`

Formula Breakdown

• Here, D5:D14 is the range of Sales, and C5:C14 is the range of Dates.
• Then, MONTH(C5:C14) will return the months of the dates, and then it will be equal to 2 and which means February.
• Similarly, YEAR(C5:C14) will return the years of the dates, and then it will be equal to 2020.

âž¤ Consequently, press ENTER.

Result:
Then, you will get the sum of sales for February of the year 2020.

### Method-5: Summing up Values for a Month of a Year Based on Criteria

Letâ€™s say, you want to sum up the Sales for January of the year 2019 for the criteria of the Region of North. You can do this by using the SUMIFS function and the DATE function.

Steps:
âž¤ Firstly, select the output Cell H9.
âž¤ Secondly, type the following formula:

`=SUMIFS(D5:D14,E5:E14,"North",C5:C14,">="&DATE(2019,1,1),C5:C14,"<="&DATE(2019,1,31))`

Formula Breakdown

• Here, D5:D14 is the range of Sales, E5:E14 is the first criteria range and North is the first criterion.
• Then, C5:C14 is both the second and third criteria range.
• `">="&DATE(2019,1,1) `is the second criterion where DATE will return the first date of a period.
• `"<="&DATE(2019,1,31) `is the third criterion where DATE will return the last date of a period.

âž¤ Lastly, press ENTER.

Result:
Now, you will get the sum of sales for January 2019 for the North Region.

### Method-6: Using SUM & IF Functions for a Month of a Year Based on Criteria

If you want to sum up the Sales for January of the year 2019 for criteria of the Region of North. Actually, you can do this by using the SUM function and the IF function.

Steps:
âž¤ Firstly, select the output Cell H9.
âž¤ Secondly, type the following formula:

`=SUM(IF(MONTH(C5:C14)=1,IF(YEAR(C5:C14)=2019,IF(E5:E14="North",D5:D14))))`

Using the IF function three logical conditions have been used here.

âž¤ Finally, press ENTER.

Result:
Afterward, you will get the sum of sales for January 2019 for the North Region.

Read More: Sum Values Based on Date in Excel

### Method-7: Using Pivot Table for Doing SUMIF by Month and Year

You can have the sum of sales for a month or a year using the Pivot Table.

Steps:
âž¤ At first, go to Insert Tab >> PivotTable Option >> From Table/Range.

As a result, PivotTable from table or range Dialog Box will pop up.

âž¤ Then, select the table/range >> After that, click on New Worksheet.
âž¤ Lastly, press OK.

At this time, a new sheet will appear where you have two portions named PivotTable1 and PivotTable Fields.

âž¤ Now, drag down Sales to the Values area >> Years to the Rows >> Date to the Rows area.

After that, the following table will be created.

âž¤ Then, select any Cell of the Row Labels.
âž¤ Now, Right-click on your mouse >> from the Context Menu Bar >> select Group Option.

As a result, a Grouping Dialog Box will appear.

âž¤ Now, check the StartingÂ at andÂ Ending at the desired dates and mark the Months and Years option in the indicated area.
âž¤ Then, press OK.

Result:
Now, you will get the sum of sales for a month of a year as below.

## Practice Section

For doing practice by yourself we have provided a Practice section like below for each method in each sheet on the right side. Please do it by yourself.

## Conclusion

In this article, I tried to cover the easiest ways to do SUMIF by Month and Year in Excel effectively. Hope you will find it useful. If you have any suggestions or questions, feel free to share them with us.

<< Go Back to SUMIF Date Range | Excel SUMIF Function | Excel FunctionsÂ |Â Learn Excel

## What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Tanjima Hossain

TANJIMA HOSSAIN is a marine engineer who enjoys working with Excel and VBA programming. For her, programming is a handy, time-saving tool for managing data, files, and online tasks. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. She holds a B.Sc. in Naval Architecture & Marine Engineering from BUET and is now a content developer. In this role, she creates tech-focused content centred around Excel and VBA. Apart from... Read Full Bio

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF