Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Time problem

Status
Not open for further replies.
Joined
Apr 19, 2000
Messages
73
Location
US
I have a timesheet worksheet that has a time in column and time out column and hours worked column

The time in column and the time out column has the cells formatted as time HH:MM AM/PM
The hours column has the cells formatted as number (2 decimal places).
I need to auto calculate the difference between the time in and time out and return it in numeric format (example if a time in cell is 8:00 AM and a time out cell is 9:30 AM an hours cell produces 1.5)
THE PROBLEM-- If a user enters Anything other than the exact time in or time out,the cells return a value of January 1,1900 12:00 AM. How do I keep the user from entering anything other than HH:MM AM/PM?
(so the user can't enter in the time in and time out cells text where a number should be or a number that isn't time like 82:70 PM)
 
Data>Validation>Time

choose start and end time et voila

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top