In your example workbook, you could use this formula in cell I6:
=IF(A7="",I5,IF(AND(NOT(WEEKDAY(A7)=1),NOT(WEEKDAY(A7)=7)),IF(B10>TIME(9,0,0),"Red",IF(B10=TIME(0,0,0),"Yellow","Green")),"Blank"))
then autofill down the column and that will get you the colour each row should be. Then either set up the conditional formatting or put a macro in along the lines of:
sub macro_1()
dim count
for count = 6 to 3000
if Range("I"& count) = "Red" then
Range("A" & count & ":I" & count).interior.colorindex=3
elseif Range("I" &count) = "Green"
Range("A" & count & ":I" & count).interior.colorindex=4
elseif Range("I & count = "Yellow"
Range("A" & count & ":I" & count).interior.colorindex=27
else
Range("A" & count & ":I" & count).interior.colorindex=xlnone
end if
next
end sub
Bookmarks