New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Limiting time entries with basic controls

From: Excel 2010: Data Validation in Depth

Video: Limiting time entries with basic controls

In this worksheet, there is a data validation rule for column B that restricts all of the dates to the year 2011. If this company only takes orders from 6 a.m. until 8 p.m., similarly, we'd like a rule in column C related to times that makes sure that all the time entries fall within that range. Click column C, on the Data tab, Data Validation. And under Validation criteria, Allow > Time, and similar to Values and Decimals and Data entries, we start off by at least exploring some of the choices here between a certain timeframe, equal to, greater than.

Limiting time entries with basic controls

In this worksheet, there is a data validation rule for column B that restricts all of the dates to the year 2011. If this company only takes orders from 6 a.m. until 8 p.m., similarly, we'd like a rule in column C related to times that makes sure that all the time entries fall within that range. Click column C, on the Data tab, Data Validation. And under Validation criteria, Allow > Time, and similar to Values and Decimals and Data entries, we start off by at least exploring some of the choices here between a certain timeframe, equal to, greater than.

Certainly, equal to wouldn't make any sense here, but greater than, less than might apply sometimes between. So we're going to put in the Starting time of 6 a.m. For example, 6:00 would be the way to enter it. We could also put in 6 a.m. if we wished. Ending time, 8 p.m. We might type it this way. It should work too. Click OK. So put an entry in here, 6:30. We could type the entry that way. That's just fine. How about 6:30 p.m.? You could type it this way.

I would caution you though: probably you want to do some formatting here. You could type it this way if you wish, by the way. That's fine, too. But let's put in a time that's outside the frame. 4:30 is automatically interpreted as 4:30 a.m. That's outside the frame of the data validation criteria that we set up, so obviously that's not acceptable. How about 8:30 p.m.? Whether you type it 8:30 p, that is a valid entry if we didn't have data validation rules, but it's not acceptable here. If we type in 24-hour style--17:00, for example, that's 5 o'clock. Do it that way.

That's just fine. So a variety of techniques here for entering the data, but data validation is focused only on the values that you put in, not the display. So ideally, on the timeframes here, what you can do, either before or after setting up the data validation, simply right-click column C--one of many ways to get to a Format Cells--and put in a standard timeframe that fits your particular needs. The two most common ones are the second one, the so-called 24-hour style, or the third one that shows a.m. p.m.

Now, no matter how you type this, if the time is within the valid range, it's going to appear in this style. So a sale at 4:30 p.m. you could type it as 16:30. It will display this way. It's well within the timeframe. If you try and put in 8:30 p.m., type it this way. It's not going to work, as you would expect, and so on. So, easy to set up, and most of the time I think when you're using this particular data validation criteria set for Time, it's likely to be within a certain timeframe: beginning and ending time.

Show transcript

This video is part of

Image for Excel 2010: Data Validation in Depth
Excel 2010: Data Validation in Depth

17 video lessons · 9054 viewers

Dennis Taylor
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.