ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Data Validation (https://www.excelbanter.com/excel-discussion-misc-queries/65854-data-validation.html)

exsam21

Data Validation
 

I am having the data entry clerk entering time in military form (ex:
1330 = 1:30pm), but I do not want the last two digits to go over 60 at
anytime. Can anyone help? Is there a function in excel that will do
military time? Thanks.


--
exsam21
------------------------------------------------------------------------
exsam21's Profile: http://www.excelforum.com/member.php...o&userid=22666
View this thread: http://www.excelforum.com/showthread...hreadid=502516


Gary Brown

Data Validation
 

You could use a custom data validation as follows:-

(assuming the data is going into A1 - adjust A1 if this is not the
case)

=IF(VALUE(RIGHT(A1,2))60,FALSE,TRUE)

You may want to expand this to validate the hours as well, so that you
can't enter a number greater than 23.


--
Gary Brown
------------------------------------------------------------------------
Gary Brown's Profile: http://www.excelforum.com/member.php...o&userid=17084
View this thread: http://www.excelforum.com/showthread...hreadid=502516


exsam21

Data Validation
 

Thank you very much.


--
exsam21
------------------------------------------------------------------------
exsam21's Profile: http://www.excelforum.com/member.php...o&userid=22666
View this thread: http://www.excelforum.com/showthread...hreadid=502516



All times are GMT +1. The time now is 03:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com