Excel - Caculating Time between 2 times, within Hours of Operation

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Dreambringer

Thread Starter
Joined
Jan 19, 2005
Messages
1,351
Ok yet another challenge.

Here is what I have.

2 sets of date and time.

Code:
      Start Time                        End Time
1/6/2006 13:21:56            1/7/2006 8:54:21
Now if its the same day I do not have a problem. But this is where it get complicated.

We close at 8:00 PM (Central Time) and Open up at 7:00 AM (Central Time). So we are closed for 11 Hours.

So for this example the "Open Time" would be 8:32:25 because of our hours of operation.

So I have played around some forumulas and did not really come up with much which is why I am here.

So I know
Code:
=SUM((L73-K73)-(TIME(11,0,0)))
Would give me the correct "Open Time" but only for those on differnt days. Any ideas on how I can get it to check if its the same date first? I played around with a few IF statments but did not come up with much.. :(

Thanx in advance!
 
Joined
Jul 1, 2005
Messages
8,546
Maybe use INT to strip out the fractions? Like:

=(IF(INT(StartTime)=INT(EndTime),

etc.

HTH,
Andy
 
Joined
Jan 4, 2006
Messages
107
Try : =(L73-K73)-(0.4583*(INT(L73)-INT(K73)))
very much along the same lines as Andy. 0.4583 is 11:00 o'clock.
Tom
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top