Check if data is 10% above or below rolling 3 weeks average

MDuff

Well-known Member
Joined
Dec 29, 2002
Messages
529
Office Version
  1. 365
Platform
  1. Windows
I have my data listed in the table below

What I am looking for is (at least in my mind) a little complicated :)

What i need is that if the data on a rolling 3 weeks average of each weekday is above or below "10%" then it "flags" it this is from the data in B SumOfcallsoffered ONLY

I would need this to be rolling form the start date of the data to the end date and this data set will be increasing as time goes by. and checking every weekday on this criteria moving forward down the data. It is fine if we use the 1st 3 weeks as a "base" then continue for the rest of the data set

So it would need to average the last 3 Mondays in the list then check if the 4th Monday is +/- 10% and if so "flag it with and X or a word then repeat for the next 3 weeks etc

I hope this is clear and if you need any other information please let me know

PS it can be in Formulas UDFs or VBA

Thanks in advance
Forecasting v1.xls
ABCD
1date_numericSumOfcallsofferedSumOfacdcallsAHT
201-Jan-056665302.6923077
302-Jan-05122119221.4453782
403-Jan-0519871966206.2894201
504-Jan-0520231996204.5761523
605-Jan-0521222015210.5052109
706-Jan-0519931949209.5489995
807-Jan-0519091877207.7565264
908-Jan-05150148197.3918919
1009-Jan-05108106271.5754717
1110-Jan-0522232187197.3886603
1211-Jan-0520892050207.3282927
1312-Jan-0521542089209.5222595
1413-Jan-0519601940198.5273196
1514-Jan-0519081851222.3662885
1615-Jan-05150147177.4965986
1716-Jan-05105105210.0952381
1817-Jan-0514511445197.5882353
1918-Jan-0523562302207.7836664
2019-Jan-0522442180203.2357798
2120-Jan-0521002069210.0183664
2221-Jan-0520271956212.0674847
2322-Jan-05117116216
2423-Jan-059191270.8351648
2524-Jan-0522282157201.1942513
2625-Jan-0522712159209.7253358
2726-Jan-0520472010220.4920398
2827-Jan-0520491988212.2022133
2928-Jan-0519431883217.9490175
3029-Jan-05118118190.3389831
Baseline
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I entered this formula,

=OR(B23>(INDIRECT("B"&ROW()-21)+INDIRECT("B"&ROW()-14)+INDIRECT("B"&ROW()-7))/3*1.1,(B23<(INDIRECT("B"&ROW()-21)+INDIRECT("B"&ROW()-14)+INDIRECT("B"&ROW()-7))/3*0.8))

in an empty column (I used column G), in the range, G23:G30, coverting 22-Jan through 29-Jan. Only cell G25 showed TRUE, all the others showed FALSE. I clicked on B23, Format, Conditional formatting..., and entered the formula, =G23, clicked on Format, Patterns, and chose a medium-blue color, then OK, OK. That did it, only cell B23 has a blue background.

I would like o say that I tried the complee formula for the Conditional formatting, and, somehow, couldn't get it to work!
 
Upvote 0
The below assumes you have one row for each date.

In F1 enter the threshold of interest, 10% in your example.

In E23 enter the formula =AVERAGE(N(OFFSET(B23,{-7,-14,-21},0,1,1)))

In F23 enter the formula =IF(B23>(1+$F$1)*E23,"Above",IF(B23<(1-$F$1)*E23,"Below",""))

Copy E23:F23 as far down column E as you have data.
 
Upvote 0

Forum statistics

Threads
1,214,385
Messages
6,119,205
Members
448,874
Latest member
Lancelots

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