Average for the last 12 months

pkarri

New Member
Joined
Nov 4, 2008
Messages
2
Hi,
I've been trying to do this for a day now and have searched the boards, but couldn't find a satisfactory solution. I'm hoping someone can help.

I have daily sales information going back several years. The data is organized as follows:

Date Sales
11/4/08 $aaa
11/3/08 $bbb
10/31/08 $xxx
10/30/08 $yyy
:
:
:
6/12/02 $zzz

I need to summarize this as follows:

Month Average Sales
Nov-08
Oct-08
Sep-08
:
:
:
Dec-07

The data keeps getting updated daily, but the summary should be for the last 12 months, including the current (partial) month. There is no data for weekends and holidays. I can do this manually and update the sum() range daily for the past 12 months, but is there an easier way to do this?

Appreciate any suggestions.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Use the SUMIF function. You need to add another column next to your data that you're going to sum to strip out the days from the month(let's say this is in column c) use formula =Month(A1)&Year(A1). Then you can use the sumif function. =SUMIF(C:C,month(A1)&Year(A1),B:B)
 
Upvote 0
Another option would be to use a pivot table and group the dates by month.

Along those same lines, you could create a third column (let's say C1:C10, assuming your original data is in A1:A10 and B1:B10) using the formula:

=TEXT(A1,"mmm-dd")

Use that in C1 and fill down to C10. Then create a pivot table off of all three columns, and group by column C instead of by column A.
 
Upvote 0

Forum statistics

Threads
1,214,559
Messages
6,120,203
Members
448,951
Latest member
jennlynn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top