Data Validation

P

Pete

How can I restrict entry to ceels between the times of
18:00 & 06:00, this must allow 22:00 etc

This is so it covers the night shift in 24hr format

Pete
 
D

Debra Dalgleish

Select the cells
Choose Data>Validation
From the Allow dropdown, choose Custom
In the Formula box, type a formula that refers to the active cell, e.g.:

=OR(B5>=0.75,B5<=0.25)

Click OK
 
D

Dave Peterson

One way is to add 6 hours to what's in the cell and then check that to see if
it's still less than noon.

=MOD((A1+TIME(6,0,0)),1)<TIME(12,0,0)

(maybe "<=" instead of "<")
 
R

Ragdyer

Try this:
Say times to be entered in Column E
Select E1:E10, then,
<Data> <Validation>,
In "Allow" window, check "custom",
In Formula box, enter:

=OR(E1>=TIME(18,,),E1<=TIME(6,,))
Then <OK>.
 
Top