Dynamic calculation for LTM/TTM (last 12 months)

krodriguez

Board Regular
Joined
Jul 11, 2012
Messages
119
Hello,

Is there a way to have a dynamic calculation for LTM...I want to get rid off =SUM(Cell1, Cell2, Cell3...Cell12) and manually change the cells once I move from month to month. Ideally the formula can detect the dates and just bring the values.

Example I have:
If I do LTM Dec-15 my results = $1200, what If I want to do LTM Jan-16 = $1300...the idea is to have a dynamic formula that will allow me to select my date, example Jan-16 and automatically calculate the LTM (so I don't mess with the formula), is this possible? Thanks



[TABLE="class: grid, width: 600"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Jan-15[/TD]
[TD]Feb-15[/TD]
[TD]Mar-15[/TD]
[TD]Apr-15[/TD]
[TD]May-15[/TD]
[TD]Jun-15[/TD]
[TD]Jul-15[/TD]
[TD]Aug-15[/TD]
[TD]Sep-15[/TD]
[TD]Oct-15[/TD]
[TD]Nov-15[/TD]
[TD]Dec-15[/TD]
[TD]Jan-16[/TD]
[/TR]
[TR]
[TD]Revenue[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]200[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Calculating with dates is a pain in Excel. But I think this might do it for your project. [N.B. Dates are entered here as Excel date serial numbers.]

{Having trouble with the HTML Editor...}
<b5:p5) (b5:p5<="$B$1))
<b5:p5)*b6:p6*(b5:p5<=$b$1))[ code]
<b5:p5)*b6:p6*(b5:p5<=$b$1))<b5:p5)*b6:p6*(b5:p5<=$b$1))}
</b5:p5)*b6:p6*(b5:p5<=$b$1))<b5:p5)*b6:p6*(b5:p5<=$b$1))}
</b5:p5)*b6:p6*(b5:p5<=$b$1))[></b5:p5)>
 
Last edited:
Upvote 0
Try again:


Book1
ABCDEFGHIJKLMNOP
1criteriaNov 1, 2015
2prior months12
3Total1,100
4
5DateJan 1, 2015Feb 1, 2015Mar 1, 2015Apr 1, 2015May 1, 2015Jun 1, 2015Jul 1, 2015Aug 1, 2015Sep 1, 2015Oct 1, 2015Nov 1, 2015Dec 1, 2015Jan 1, 2016Feb 1, 2016Mar 1, 2016
6Revenue100100100100100100100100100100100100200500900
Sheet22
Cell Formulas
RangeFormula
B3=SUMPRODUCT((EDATE($B$1,-$B$2))*B6:P6*(B5:P5<=$B$1))
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,027
Members
452,374
Latest member
keccles

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