View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default Excel Used as a Time Sheet

That that I read your post more closely: assume dates start in B2. C2
holds the start time for that date. D2 holds the end time. E2 holds
the leave code. The conditional formatting for C2 is
=AND(C2="",E2="",B2<TODAY()+1)
This turns the cell red if C2 is blank and E2 is blank.

Conditional formatting for D2 is
=AND(D2="",E2="",B2<TODAY()+1)
D2 turns red if C2 and E2 are blank.

Conditional formatting for E2 is
=AND(E2="",AND(C2="",D2=""),B2<TODAY()+1)
E2 is red if both C2 and D2 are blank, and E2 is blank.

If an entry is made to C2 or D2, no entry will be expected in E2 so E2
flips from red to normal.