View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default validate time entries linked to each other

1. Select the cell/Range (say A2:D10). Please note that the cell reference A2
mentioned in the formula is the active cell in the selection. Active cell
will have a white background even after selection

2. From menu FormatConditional Formatting

3. For Condition1Select 'Formula Is' and enter the below formula

=IF(COUNT($A2:$D2)=4,OR($B2<$A2,$C2<$B2,$D2<$C2,$A 2
TIMEVALUE("9:00"),$B2TIMEVALUE("13:00")))

4. Click Format ButtonPattern and select your color (say Red)

5. Hit OK

PS: This validates only when all 4 cells are not blank

If this post helps click Yes
---------------
Jacob Skaria


"matfis" wrote:

Hi all,
Here is my problem: my staff has to enter over time per day.
What would be the best way to validate those entries, ie: assuming that:
A2, B2, C2 and D2 being respectively Start_am, End_am. Start_pm and End_pm?
No entry is implemented as "-" (dash symbol).
Type of validation: A2 < B2 and A2 < 9:00 and B2 < 13:00 and B2 < C2 < D2.
tia.
matfis