PC Review


Reply
Thread Tools Rate Thread

Data validation on a custom format

 
 
Robert Crandal
Guest
Posts: n/a
 
      17th Dec 2009
Hi again everyone....

I am currently using the following custom format:

[h]:mm

How can I use data validation to prevent invalid
data from being entered into a cell of that format??

For my purposes, I only want data which consists
of 1 or more digits in the "hours" field, folowed by
one colon, followed by 1 to 2 digits in the minutes
field.

Do I need to enter some sort of formula into the
data validation field??

thank you!


 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      17th Dec 2009
There's an option in the Data|Validation|Settings tab
that you can set for Time.

It sounds like you want something between 00:00:00 and 9:59:59

Your formatting will hide any seconds that the user enters.



Robert Crandal wrote:
>
> Hi again everyone....
>
> I am currently using the following custom format:
>
> [h]:mm
>
> How can I use data validation to prevent invalid
> data from being entered into a cell of that format??
>
> For my purposes, I only want data which consists
> of 1 or more digits in the "hours" field, folowed by
> one colon, followed by 1 to 2 digits in the minutes
> field.
>
> Do I need to enter some sort of formula into the
> data validation field??
>
> thank you!


--

Dave Peterson
 
Reply With Quote
 
Robert Crandal
Guest
Posts: n/a
 
      17th Dec 2009
Hmmm, that isnt exactly what I wanted because my data is
not for specifying a time on a clock. My custom format
is used for specifying time durations in hours and
minutes elapsed. So, for example, the following data values
are valid:

00:33 ' 0 hrs & 33 minutes
1:00 ' 1 hr & 0 minutes
250:12 ' 250 hrs & 12 minutes

I would just like to be able to prevent users from entering
data that is different than the above examples. For example,
here are a few invalid data types:

00:::33 ' too many colons
0a:22 ' contains alpha chars
12:11123 ' too many minutes?
...
etc. etc.


"Dave Peterson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> There's an option in the Data|Validation|Settings tab
> that you can set for Time.
>
> It sounds like you want something between 00:00:00 and 9:59:59
>
> Your formatting will hide any seconds that the user enters.
>
>
>>
>> Hi again everyone....
>>
>> I am currently using the following custom format:
>>
>> [h]:mm
>>


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      17th Dec 2009
Try limiting the value to a date.

And make sure it's less than 10 (for 240 hours) or 20 (for 480 hours) (or
whatever limit you want).

Then try entering some of those values.

Post back with the entries that failed that should have been ok and the ones
that were accepted that should not have been.

Robert Crandal wrote:
>
> Hi again everyone....
>
> I am currently using the following custom format:
>
> [h]:mm
>
> How can I use data validation to prevent invalid
> data from being entered into a cell of that format??
>
> For my purposes, I only want data which consists
> of 1 or more digits in the "hours" field, folowed by
> one colon, followed by 1 to 2 digits in the minutes
> field.
>
> Do I need to enter some sort of formula into the
> data validation field??
>
> thank you!


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom data validation on cells with data validation values AKrobbins Microsoft Excel Worksheet Functions 2 21st Jun 2011 04:20 PM
Custom function valid in Data Validation/Conditional Format? =?Utf-8?B?VGV0c3V5YSBPZ3VtYQ==?= Microsoft Excel Programming 1 8th Jul 2005 02:56 AM
Custom Format and Data Validation Q John Microsoft Excel Worksheet Functions 1 6th Jan 2005 05:56 PM
How to use data validation - Custom validation 0-0 Wai Wai ^-^ Microsoft Excel Discussion 1 7th May 2004 09:04 PM
Custom Date Format Validation Andy Microsoft ASP .NET 0 26th Apr 2004 04:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:33 AM.