Rolling 12 month total

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
304
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
How do you create a rolling 12 month total? I found a formula
Excel Formula:
=SUMIF(A$2:A2,”>=” & DATE(YEAR(A2),MONTH(A2)-11,DAY(A2)),B$2:B2)
but it sums 0.0000 (see screenshot) and I can't figure out what I did wrong.
1643634881309.png
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
You have the wrong type of quotes, it should be
Excel Formula:
=SUMIF(A$2:A2,">=" & DATE(YEAR(A2),MONTH(A2)-11,DAY(A2)),B$2:B2)
 
Upvote 0
Solution
Fantastic! Thank you. That's what I get for copying the silly thing and pasting it into my spreadsheet. It's the little things that count! Thank you again. I re-wrote the formula (using the correct quotation marks) and it works.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
I've discovered two things with this, on the 13th month this is not calculating correctly. It appears to only be going back 11 months. Shouldn't the total for D14 be 0.036?
I've also discovered the formatting for the month-year must be changed. I have to put the three letter designation of the month in column A and the four digit year in column B. How would I modify the formula to accommodate the change?
 

Attachments

  • 10Feb.PNG
    10Feb.PNG
    49.7 KB · Views: 4
Upvote 0
For that formula to work col A needs to be actual dates not text & they all need to be the same day
 
Upvote 0

Forum statistics

Threads
1,214,886
Messages
6,122,093
Members
449,064
Latest member
Danger_SF

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