Google Sheets SUMIF: Summing by Month and Year Made Easy

Have you ever wondered how to use the SUMIF function in Google Sheets to sum by month and year? Well, you’re in luck! In this tutorial, I’ll walk you through the process step by step and show you how to save time with this powerful formula.

The Magic of Grouping Data in Google Sheets

In Google Sheets, the possibilities for grouping data are truly exciting. There are many different formula options that can help you manipulate and analyze your data. In this tutorial, we’ll focus on using the SUMIF function to sum data by month and year.

Before we dive in, let me clarify that the formula for summing data by month and year is different from simply summing by month. Once you learn this formula, it will become a valuable time-saving tool.

Let’s Get Started

First, let’s take a look at the sample data we’ll be working with. In the provided sample data, you’ll find a column of dates that span from 2016 to 2018.

If we were to summarize this data on a monthly basis, we would get incorrect results since the years are different. What we really want is a summary that considers both the month and year.

Sample Data

In the above screenshot, you can see that the SUMIF formula for summing by month and year is located in cell B2 of Sheet2. I’ve manually filled column A with the months in this sheet.

Based on the months (criteria) and the year specified in cell D1, the SUMIF formula in cell B2 will sum the values from Column B in Sheet1.

Breaking Down the SUMIF Formula

Now, let’s take a closer look at the SUMIF formula in cell B2:

=ArrayFormula(sumif(text(Sheet1!$A$2:$A,"MMMM-YYYY"),A2:A13&"-"&D1,Sheet1!$B$2:$B))

Formula Explanation

The syntax of the SUMIF function in Google Sheets is as follows:

SUMIF(range, criterion, [sum_range])

Let’s break down the above formula according to this syntax:

  • Range: text(Sheet1!$A$2:$A, "MMMM-YYYY")
    This formula converts the dates in Column A of Sheet1 to the month-year format. Take a look at the screenshot below to see how it works:

Range

  • Criterion: A2:A13&"-"&D1
    In Column A of Sheet2, we have the months entered as text strings. For example, “January”, “February”, and so on. The criterion formula combines the months from Sheet2 with the year specified in cell D1.

  • Sum_Range: Sheet1!$B$2:$B
    This is the range of values in Column B of Sheet1 that will be summed based on the criteria (Screenshot 4) and range (Screenshot 3).

That’s all there is to it! Now you know how to use Google Sheets SUMIF to sum by month and year.

Conclusion

The above SUMIF formula provides a month and year-wise summary. If you only need a month-wise summary and your date range falls within a single year, you can simplify the formula as follows:

=ArrayFormula(sumif(text(Sheet1!$A$2:$A,"MMMM"),A2:A13,Sheet1!$B$2:$B))

Please note that this formula does not consider the year in the date column of Sheet1.

If you want to try it out yourself, feel free to check out the Sample Google Sheet that contains the formula to sum by month and year.

More Topics Related to Month-Wise Grouping

  1. How to Group Data by Month and Year in Google Sheets
  2. Month-Wise Formula-Based Pivot Table Report in Google Sheets
  3. Creating a Weekly Summary Report
  4. Summing by Month in Google Sheets Using SUMIF

With these tips and tricks, you’ll be able to unleash the full potential of Google Sheets and master the art of summing data by month and year.

Now go forth and conquer those spreadsheets like a pro!

Related posts