OK, thanks for the expected results - that really helps.
Here is a revised CF formula that matches your expected results except for 3 cells, all of which (to the best of my understanding) should in fact be highlighted. Let me know if you disagree!
- Shouldn't T11 (dept O) be highlighted because of T4 (employee B) positive test?
- Shouldn't F23 (dept A) be highlighted because of F19 (employee R) positive test?
- Shouldn't G24 (dept E) be highlighted because of G19 (employee R) positive test?
Here's the considerably revised CF formula:
Formula:
=OR(AND(SUMPRODUCT(--($W$3:$W$200 < $W3), --($W$3:$W$200 > ($W3-14)), --(F$3:F$200="x"), --($X$3:$X$200 = "positive"))>0, F3="x"),
AND(F3="x", COUNTIFS($W$3:$W$200, $W3, F$3:F$200, "x")>1))
An updated workbook is attached. For easy comparison I retained your expected results starting in col-AL and I highlighted the three discrepancies in red. (I've also hidden a few columns just for my convenience).
Hopefully we're getting closer
- let me know.
Geoff
Bookmarks