Rolling Min Max of Last 12 Months

csimarketing

New Member
Joined
Jun 18, 2019
Messages
15
Office Version
  1. 2019
Platform
  1. MacOS
Hello,

I am trying to get a rolling/dynamic formula that calculates the MIN and MAX of the most recent 12 months, but all of the threads I can find are not specific enough. Any help would be greatly appreciated!

MIN formula should return: 2
MAX formula should return: 84

MonthJan-20Feb-20Mar-20Apr-20May-20Jun-20Jul-20Aug-20Sep-20Oct-20Nov-20Dec-20Jan-21Feb-21Mar-21MIN Last 12 MonthsMAX Last 12 Months
QTY2045416778424665431234547813

Thank you!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Try:

=MINIFS($B$2:$P$2,$B$1:$P$1,">="&EOMONTH(TODAY(),-12)+1,$B$1:$P$1,"<"&EOMONTH(TODAY(),0)+1)

Same for max but MAXIFS.
 
Upvote 0
=MINIFS($B$2:$P$2,$B$1:$P$1,">="&EOMONTH(TODAY(),-12
Hi Steve, the MAXIF formula works great!

However, the MINIF formula is still including Zeros as a min. Is there a way I can exclude Zero values or only values greater than Zero to be counted towards the MIN?

I should have mentioned that the data above is just a sample set, my actual data set does have some months with Zero as their value.
 
Upvote 0
Sure just add that in:

=MINIFS($B$2:$P$2,$B$1:$P$1,">="&EOMONTH(TODAY(),-12)+1,$B$1:$P$1,"<"&EOMONTH(TODAY(),0)+1,$B$2:$P$2,">0")
 
Upvote 0
Solution

Forum statistics

Threads
1,214,632
Messages
6,120,652
Members
448,975
Latest member
sweeberry

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