Computing.Net > Forums > Office Software > Time calculations

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Time calculations

Reply to Message Icon

Name: dbz2220
Date: May 16, 2009 at 19:10:53 Pacific
OS: Macintosh
Subcategory: Microsoft Office
Comment:

How do you calculate time if the time period is typed
in one cell. example:

Cell A1: 0500 - 1530
Cell B1: 1200 - 1830
Cell C1: 1300 - 2230

My main goal is to post a sheet that has everyones
shift times per day, with the amount of hours
calculated at the end of each row. Keep in mind,
every shift also gets a 30 min unpaid lunch, so I need
to factor that in as well. And whenever I change the
time of the shift in each cell, I would like the hours to
adjust itself.

PLEASE HELP ME!



Sponsored Link
Ads by Google

Response Number 1
Name: cyoung311
Date: May 16, 2009 at 19:40:45 Pacific
Reply:

Is the format of the time range always going to be 4 characters followed by "-" followed by 4 characters? If so (and you're using MS Excel), try using the formula =MID(B2,6,4)-MID(B2,1,4) where B2 is the cell containing the time span characters and the second argument is the starting character position in the cell and the third argument is the number of characters. You'll have to adjust the cell number and the starting position of the character string in your own application.


0

Response Number 2
Name: Mike (by mmcconaghy)
Date: May 17, 2009 at 09:06:40 Pacific
Reply:

I would advise against doing it this way, you would be better off breaking the single cell into two separate time cells, but if you must, try this:

=TIME(MID(B1,8,2),MID(B1,10,2),)-TIME(MID(B1,1,2),MID(B1,3,2),)-TIME(,30,)

It will display the answer in a Time format such as 10:30 and then subtract the 30 minutes for lunch and give you 10:00.

MIKE

http://www.skeptic.com/


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Time calculations

time calculations where time goes i www.computing.net/answers/office/time-calculations-where-time-goes-i/7533.html

Excel Time calculations www.computing.net/answers/office/excel-time-calculations/6326.html

Time Calculation www.computing.net/answers/office/time-calculation/6314.html