Count days as a specific status (Red, Yellow, Green - using data validation) until status changes

daytona12345

New Member
Joined
Aug 31, 2021
Messages
20
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hard to explain from the title alone. What I would like to be able to do is calculate the number of (days or weeks) a specific project has had a specific health score, before it changes. Assume that the sheet has many many date ranges and there will be a new column added each week with a new status of either Red, Yellow or Green. I could add a column that lists "CURRENT STATUS" as the most recent.

For Example:

PROJECT NAME2 was yellow for 3 months then turned red. Ideally a print out of something like "PROJECT NAME2 was yellow for prior 3 months, current status = red"


project status.png
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
This is hard to follow.

Mr Excel Playground 3.xlsm
ABCDEFGHIJKLM
1PM DashOld StreakStreakOldStreak?Current Status3/1/20214/1/20215/1/20216/1/20217/1/20218/1/2021
2Project151GreenFALSERedGreenGreenGreenGreenGreenRed
3Project212GreenTRUEGreenYellowYellowRedRedGreenGreen
4Project331RedFALSEYellowRedYellowRedRedRedYellow
5
6Project1 is currently Red but was Green for the prior 5 months.
7Project2 is currently Green, and has been for 2 months.
8Project3 is currently Yellow but was Red for the prior 3 months.
Sheet20
Cell Formulas
RangeFormula
I1:M1I1=EOMONTH(H1,0)+1
B2:B4B2=MATCH(0,(--(INDEX($A2:$AAB2,1,SEQUENCE(MAX(IF(((H2:AAB2))="",0,COLUMN(H2:AAB2)))-6,1,MAX(IF(((H2:AAB2))="",0,COLUMN(H2:AAB2)))-1,-1))=INDEX($A2:$AAB2,1,MAX(IF(((H2:AAB2))="",0,COLUMN(H2:AAB2)))-1))),0)-1
C2:C4C2=MATCH(0,(--(INDEX($A2:$AAB2,1,SEQUENCE(MAX(IF(((H2:AAB2))="",0,COLUMN(H2:AAB2)))-5,1,MAX(IF(((H2:AAB2))="",0,COLUMN(H2:AAB2))),-1))=INDEX($A2:$AAB2,1,MAX(IF(((H2:AAB2))="",0,COLUMN(H2:AAB2)))))),0)-1
D2:D4D2=INDEX($A2:$AAB2,1,MAX(IF(((H2:AAB2))="",0,COLUMN(H2:AAB2)))-1)
E2:E4E2=INDEX($A2:$AAB2,1,MAX(IF(((H2:AAB2))="",0,COLUMN(H2:AAB2))))=INDEX($A2:$AAB2,1,MAX(IF(((H2:AAB2))="",0,COLUMN(H2:AAB2)-1)))
F2:F4F2=INDEX($A2:$AAB2,1,MAX(IF(((H2:AAB2))="",0,COLUMN(H2:AAB2))))
A6:A8A6=A2&" is currently "&F2& IF(E2,", and has been for "&C2&" months."," but was "&D2&" for the prior "&B2&" months.")
 
Upvote 0
This looks great, I can certainly work from this. I'm sure this took a fair amount of time to make, it's very appreciated.
 
Upvote 0
Theoretically this should have never been an issue, but the way we have JIRA setup, I can't do this query in a JIRA dashboard
 
Upvote 0
eomonth isn't critical to the function of the thing. It's just a solid way of getting the first of the month in a series. The spreadsheet doesn't need it for anything.
 
Upvote 0

Forum statistics

Threads
1,215,584
Messages
6,125,670
Members
449,248
Latest member
wayneho98

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