I want to apply formatting to cells based on two named ranges that contain a start and an end date.
vOffSt and vOffEnd
I compare those dates as follows to highlight the specific cell that match.
So... any cell that matches vOffSt is handled and works perfectly with
=SUMPRODUCT(--ISNUMBER(SEARCH(vOffSt,J11)))>0
cells that match vOffEnd uses
=SUMPRODUCT(--ISNUMBER(SEARCH(vOffSt,J11)))>0
So if someone takes one day off, the cell highlights perfectly.
What I need to do is highlight the range of cell's that fall between the vOffst start date and the vOffEnd end date.
So somehow, I need to check the date in the cell to see if it is >= to the vOffSt date in the named range and if it is <= the vOffEnd date in that named range.
I've tried to combine the two equations that work as
=And(j11>=SUMPRODUCT(--ISNUMBER(SEARCH(vOffSt,J11)))>0, j11<=SUMPRODUCT(--ISNUMBER(SEARCH(vOffSt,J11)))>0)
When I do that, it highlights every cell. I can't seem to figure out how to test the value in J11 first and then pass that to t he functions noted above.
Do I need to change to a vLookup instead of search or something?
Would appreciate any help.
Bookmarks