Dynamic condition formatting in excel - excel

I'm trying to improve one of my sheets and implement some smart conditioning in it.
The sheet holds information about 3 KPIs regarding parts in a production process.
Now those KPIs are measured on a monthly basis.
If each of them is smaller than 1% for 6 consecutive months the sample size reduces to a lower sampling tier from 100% to 50%.
If such a trend is seen for the next 6 months, the sample size will reduce again to a lower tier from 50% to 25%.
There are four tiers together, with the last tier being 10%.
Now in case any of the KPIs is above 1% the sample size goes back to the previous sample tier. For example, the KPIs were under 1% for 13 months. The sample size was reduced to 25%. In the 14th month, one KPI was 2%, so the sample size must increase to the previous threshold which is 50%.
Currently, I'm using an excel file that marks in the sheet a 0 next to KPI that failed for a specific month and 1 for the ones that have passed. As the next step, those values are dropped into one cell, creating a string of 1 and 0 for each KPIs. Then I need to manually analyse each string and establish the sample size.
Please keep in mind that every month new data is added.
Added a picture and sample data:
https://docs.google.com/spreadsheets/d/1g2tMkUHb_gn4EYegr0aPp3bqr5dwYusg/edit?usp=share_link&ouid=108643160822075860310&rtpof=true&sd=true
Does anyone have an idea how this could be automated?

Related

Facing difficulty in Excel when creating a logic for moving average of different variables

So, the point is, in my dataset I have to create a variable "Moving Avg. Amt paid per sq. ft." and the formula or the logic I need is to calculate the last five values as per most recent transactions. i.e. most recent sales by date. but this average should only return value in case it matches the same building and same area variable.
This is what my data looks like
Area ID has three categories. Building number has 5 categories. Date is sorted in ascending order. Now my variable moving average should calculate last 5 averages w.r.t date but for the same building in the same area. e.g. there are buildings 1 and 2 in area 102. I need my Mov Avg. variable to calculate using conditions when it matches criteria of building 1 in 102 for past five sales and when it finds building 2 in the building number variable, it should calculate average of last 5 sales of that building in area 102.
So my approach to this issue was (which is flawed at the moment):
I calculate average of amount paid per sq. foot w.r.t area & building based on dates using the formula
=AVERAGEIFS($N$2:$N$6547,$D$2:$D$6547,D14,$C$2:$C$6547,C14,$B$2:$B$6547,B14)
but I cannot make this formula work, to calculate moving average whenever it meets the criteria. I tried the offset the point as well by 5 but the logic is not right and hence its not working and returning #value in the cells. The formula I used to offset the above condition is
=AVERAGEIFS((OFFSET(N13,5,,5)),$D$2:$D$6547,D13,$C$2:$C$6547,C13,$B$2:$B$6547,B13)
(These formulae are used in column Q of my data)
Need a support from the community as I am badly stuck in making this data useful and I am out of any ideas to make this work.
Edit 1: I am not sure how I can attach my excel file here so you may review the dataset. I have uploaded it on a third party site, for which the link is shared below, so you can view the file in detail.
https://file.io/hlciAHJOHzWA
Expected result is as I have mentioned the instruction said
"Create a variable called "mov. avg amt. paid per sq ft". For each row, this variable should calculate average amt paid per sq ft for the most recent past five sales (by date) for the same building in the same area."
And my approach to build a logic or formula to make this variable calculate moving average w.r.t date for same building in the same area doesn't seem to work because there might be some flaws.
In Office 365 you could use:
=LET(f,FILTER($N$1:N13,($B$1:B13=B14)*($C$1:C13=C14),""),
c,COUNTA(f),
s,SEQUENCE(5,,c-5),
IFERROR(IF(c<5,SUM(f)/c,SUM(INDEX(f,s))/5),""))
If there's less than 5 matches prior to the current sales it'll calculate the average of the count. If 5 or more matches it'll calculate the average of the last 5 prior to the current sale.

Significance test between Overlapped data in excel

Below is the brand preference metric data for two overlapped time periods (Week 1-3 and Week 2-4 data). I wanted do a significance test between these two overlapped groups, please provide me the details of the method and formula’s to use. We are doing these activities in excel format.
Here is the my data :
Roll Up Week 1-3 Roll Up Week 2-4
Count 697 706
Brand Preference 43% 40%
Thanks,
Tanuvi

Subtracting viralnes

i have a yearly unit that i divide by a percentage to give me the monthly equivalent. I have a growth formula that increases the monthly unit to a yearly one month by month, how can i create a formula that give me the actual unit per month not the growth. Example
4
5
7
8 this is the growth but i what 5-4=1....
7-5=2...
=ROUND(Q59*$B$49,0) is how i get 4..5..6..7..8 how do i get to 1..2..1 in one formula . Thanks
If I'm understanding you correctly you are looking for the incremental increase rather than the total increase. Without more information it is difficult to understand exactly what your looking for, but your formula sounds like it is multiplying over 100%. You want to multiply by the percentage of increase. so essentially what your doing is adding the beginning balance back in. Change your percentage in the cell to the increase and not the increase plus beginning.

How do I use Goalseek function in excel to generate a series?

am struggling with the application of goal seek function in excel. Am forecasting production for an oil well however we have a target cumulative production expected after say 20 years of production. I have produced table columns of monthly production rate and cumulative production. I would like to play (create sensitivity scenarios) with my expected cumulative production.
Can i use goal seek to change the production forecast profile per month by just changing the cumulative production at the end.
Also advise alternative functions should goal seek not be the right function for this task.
Appreciate your support
This is really just an example of what #DanK has already mentioned. Say ColumnB figures are actual production (in black) and estimates (in blue). The estimates in this case computed as number of days in the month times the factor in D1 ("daily production"). To ramp up production so that the total cumulative production (in the example below, for 1-1/2 years, rather than all 20 as in the example above), presently estimated to be 115,620 units is instead 150,000 then Goal Seek might be applied so:
whereupon the D1 value (200) should change to 287 (and the total in B19 to 150,000, and all the blue values change also). The principle should work if, say, June 2015 were calculated as 16*D1 rather than 30*D1 to allow for planned suspension of production. If that fortnight were an intervention to add production from another reservoir anticipated to be 100 per day then Goal Seek would not adjust "100 per day" but would adjust a new daily rate of 1.5*D1.

Complicated formula required to work out costs including multiple discounts

I'm looking to compute and show individual row totals and a Grand Total. I just need the formulae to put in the boxes so the calculation is automatic but the problem is the calculations are a little complicated...
I'm using data validation to select the day type. This is what I think I need:
Assign a price to the day type (either Standard day = £23 or Extended day = £26).
Apply a volume discount where appropriate. If Jack is attending all week (5 days) and the day type is the same for all (all Standard or all Extended), the total cost is £100 (or £120)
Else the total number of days needs to be added up for Jack. (Number of days for each ‘day type’) and priced up.
For his siblings after the first, as above but apply an additional discount of 15%.
The grand total then needs to show at the bottom.
Well, it is not the best of data layouts but this may serve, in L6 and copied down to L13:
=IF(OR(A6="Brother",A6="Sister"),0.85* IF(COUNTIF(B6:F6,"Standard day")=5,100,IF(COUNTIF(B6:F6,"Extended day")=5,120,COUNTIF(B6:F6,"Standard day")*23+COUNTIF(B6:F6,"Extended day")*26)), IF(COUNTIF(B6:F6,"Standard day")=5,100,IF(COUNTIF(B6:F6,"Extended day")=5,120,COUNTIF(B6:F6,"Standard day")*23+COUNTIF(B6:F6,"Extended day")*26)))
and =SUM(L1:L16) in D16.
It would be better practice not to hard code the daily rates/discount, but extracting these from C1:D2 would have increased the length of the formula further.
Note also the result is not £429.95 (you may have changed your example after doing your calculations).

Resources