Originally Posted by
ChemistB
Here's what I did (see attachment). In row 4 at hour 1 of every day, I put the date and formatted it to m/d.
Select your working range (i.e from D8:DG50) and go to conditional formatting>Use a formula
=AND(COLUMN(D8)>=MATCH(INT($B$8),$4:$4,0)+HOUR($B$8)-1,COLUMN(D8)<=MATCH(INT($C$8),$4:$4,0)+HOUR($C$8)-2)
Explaination
MATCH(INT($B$8),$4:$4,0) returns the column which matches the date in your beginning cell (B8)
)+HOUR($B$8)-1 adds the number of cells to bring to the hour
Same explaination for MATCH(INT($C$8)..... except to end
AND(COLUMN(D8)> Beginning Cell/column,COLUMN(D8)<= Ending Cell/Column will turn blue.
Does this work for you?
Bookmarks