How do I update monthly totals for the last 6 months?

A Prince

New Member
Joined
Oct 16, 2005
Messages
26
I am trying to figure out how to make a report look back for exactly 6 months and give me a total for that 6 months. I need it to do this every month, but only look at the previous 6 months.

For Example:

Jan Feb Mar Apr May Jun Jul Aug

Bob 6 5 0 3 5 1 0 4

Bill 3 1 5 3 7 2 4 1

Tom 4 0 0 3 3 1 0 4

So, in this example on the 1st of Jul bob should show 20 as the total of the previous 6 months, but on 1 Aug it should drop Jan, add July and show 14. This should work for all of the guys and run on into infinity as far as dates go. The 6 months might cover two different years. It sounds simple to me, but for the life of me I can't make it work..

Any help is greatly appreciated. BTW the numbers will probably never exceed 2 digits if that has any bearing.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Welcome to the Board

One way might be like this
Book1
ABCDEFGHIJ
1Jan-05Feb-05Mar-05Apr-05May-05Jun-05Jul-05Aug-05Sep-05
2
3Bob650351046
4
5Bill315372413
6
7Tom400331042
8
9
10Last 6 monthsif today is date in E1001/08/2005
11Bob1914
12Bill2022
13Tom137
14
Sheet5


Dates in row 1 are 1st of each month formatted as mmm-yy

suggested formula is in B11

=SUM(OFFSET(INDEX($B$3:$B$7,MATCH($A11,$A$3:$A$7,0)),,MATCH(EDATE(TODAY(),-6),$A$1:Z$1)-2,,6))

copy down to B13

I also include an example to illustrate how the results would change if today wasn't 17th October but 1st August
 
Upvote 0
Using Barry's setup for Bob, Bill and Tom; this should give you the totals for the last 6 entries in Row 3, 5 and 7.

Bob =SUM(OFFSET(B3,0,COUNTA(3:3)-6,1,6))
Bill =SUM(OFFSET(B5,0,COUNTA(5:5)-6,1,6))
Tom =SUM(OFFSET(B7,0,COUNTA(7:7)-6,1,6))
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,748
Members
448,989
Latest member
mariah3

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