LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Bert
 
Posts: n/a
Default validation of times

I have a couple of questions about validating times.
Question 1:
In any cell in Column B, I want to allow valid times in the HH:MM AM/PM
format, plus I want to allow "Noon" and "Midnight". Column B is formatted
for time in the same format (HH:MM AM/PM). I found a validation formula
that does a similar thing for dates, and after playing around for a while, I
came up with this--which I put in the Custom field in the Validation Dialog.
=OR(F2="Noon",F2="Midnight",AND(N(F2)=0,N(F2)<0.9 9999))
It doesn't work, but IF I change the "=" to just "" it works--more or
less; that is, bogus times like 10:70 AM and 13:00 PM are rejected (but not
13:00 w/o the PM, which is fine.).
BUT...I can't enter 12:00 AM (Midnight). And a minor thing: it allows
"noon" and "midnight", but is there a way to force an initial capitalized
letter on each word, e.g., "Noon" and "Midnight"? Now if I enter mIdNighT,
it accepts it. (I tried PROPER and EXACT but w/o success. Maybe there's a
simpler/better way to do this without validation, but I'm not sure how.

Question 2: How do I modify or apply this (or the proper formula, that is),
so that it works for every cell in column B?

Thanks.
Bert


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation List and VLookup are ackting strange Jasper Excel Worksheet Functions 1 January 24th 05 01:49 PM
SUMPRODUCT ON TIMES Bob Phillips Excel Worksheet Functions 1 January 13th 05 05:28 PM
Data Validation Window? Ken Excel Discussion (Misc queries) 1 January 11th 05 10:48 PM
list validation using list validation... Patrick G Excel Worksheet Functions 1 December 21st 04 12:37 AM
Excel2K: Is it possible to use dynamic named ranges in custom data validation formula? Arvi Laanemets Excel Discussion (Misc queries) 0 December 2nd 04 11:29 AM


All times are GMT +1. The time now is 01:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"