Rolling 5 Months Formula on Excel

monteee

New Member
Joined
Jun 6, 2022
Messages
3
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Hello I have a set of data with columns from Nov-21 to Dec-22 and the data / columns will be updated monthly. I am searching for a formula that allows me to enter new monthly data that will automatically calculate and update a total of 5 months (highlighted in Yellow). For instance, the formula will be able to calculate the sum of skirts from Dec-21 to Apr-22 in May, followed by Jan-22 to May-22 next month. I have tried to use the offset formula, however I couldn't figure out the logic of the formula. Can someone please help me? Thank you in advance for your assistance to this matter! =)

1654512029037.png
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi, welcome to the forum!

Here is one way that uses the current date to decide which months to include. This assumes the dates in the first row are actual Excel date serial numbers and are the 1st of the month.

Book1
ABCDEFGHIJKLMNOPQRS
1Nov-21Dec-21Jan-22Feb-22Mar-22Apr-22May-22Jun-22rolling 5 month
2staffskirtstopsskirtstopsskirtstopsskirtstopsskirtstopsskirtstopsskirtstopsskirtstopsskirtstops
3A282116395130493241325494623192166
4B35249303629221524511334035123163
5C21853142884031754231284615593
6D5332124612174744162050442848153173
7E4327165335314151292621109115
Sheet1
Cell Formulas
RangeFormula
R3:S7R3=SUMIFS(B3:P3,B$2:P$2,R$2,$B$1:$P$1,">="&EOMONTH(TODAY(),-6)+1,$B$1:$P$1,"<"&EOMONTH(TODAY(),-1)+1)
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,845
Members
449,051
Latest member
excelquestion515

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