Often you may want to sum the values of some dataset in Google Sheets based on month.
The following step-by-step example shows how to do so.
Step 1: Enter the Data
First, enter the values for a dataset that show the total sales of some product on various dates:

Step 2: Extract the Month from Dates
Next, we need to use the =MONTH() function to extract the month from each date.
In our example, we’ll type the following formula in cell D2:
=MONTH(A2)
We’ll then drag and fill this formula down to every remaining cell in column D:

Step 3: Find the Unique Months
Next, we need to use the =UNIQUE() function to produce a list of unique months.
In our example, we’ll type the following formula in cell F2:
=UNIQUE(D2:D10)
This will produce a list of unique months:

Step 4: Find the Sum by Month
Next, we will use the SUMIF(range, criterion, sum_range) function to find the sum of the sales made during each month.
In our example, we’ll type the following formula in cell G2:
=SUMIF($D$2:$D$10, F2, $B$2:$B$10)
We’ll then drag and fill this formula down to the remaining cells in column G:

This tells us:
- There were 117 total sales made in January.
- There were 50 total sales made in February.
- There were 111 total sales made in March.
Additional Resources
The following tutorials explain how to perform other common tasks in Google Sheets:
How to Calculate a Five Number Summary in Google Sheets
How to Use SUMIF Contains in Google Sheets
Wonderful, how do you list the month names instead of numbers?
I second the question!
Nevermind, Zach, I think I’ve figured this out on my own, although I am sure there are many ways to do this, but since we’re only working with 12 months, this seemed to be a good way to do it. Just substitute H for whatever cell holds your first unique month number. =SWITCH($H1,1,”January”,2,”February”,3,”March”,4,”April”,5,”May”,6,”June”,7,”July”,8,”August”,9,”September”,10,”October”,11,”November”,12,”December”,””)