@
BigRed
I am sure @
NARAYANK991 will eventually respond. But here is another solution.
First, add an extra column to your original data and calculate the end date for the inspections (this would be +9 days for Check 4 inspections and same day for others)
Then, assign below names to various ranges
- assets =data!$A$2:$A$10
- end.dates =data!$F$2:$F$10
- start.dates =data!$E$2:$E$10
- inspection.types =data!$D$2:$D$10
Then set up an output sheet like below.
Now in the entire range from B2 to end, just enter a dummy value like 0.
Next, set cell formatting to using custom format code ;;;
This will hide all the zeros. We will now show few of them selectively as "4" thru conditional formatting.
Next, apply below formula based CF rule.
=COUNTIFS(assets,$A2,start.dates,"<="&B$1,end.dates,">="&B$1, inspection.types,"Check 4 Inspection")>0
Apply some fill color and number formatting custom code [=0]"4"
Add additional rules to show other inspections if you want.
Done.
See attached workbook.