Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jackson
 
Posts: n/a
Default Excel Time Duration Formula

I'm trying to calculate the time duration in business hours. The
open/close times are in the following format:

7/28/04 8:09 7/28/04 8:18
5/24/04 10:31 6/8/04 12:13
6/17/04 10:58 6/28/04 8:33

The current formula I'm using is:

=(DAY(B3-A3)*8 + HOUR(B3-A3)+MINUTE(B3-A3)/60)

But I need to account for weekends too. I initially thought that I
could shave off 2 days from 7 day periods, but realized that a three
day period could also include a weekend. Is there any way for excel to
determine if a day falls on a Saturday or Sunday? Any other ideas on
how I could account for weekends??


Thanks in advance.

Jackson
  #2   Report Post  
CarlosAntenna
 
Posts: n/a
Default

Check out the WEEKDAY and WORKDAY functions.


"Jackson" wrote in message
om...
I'm trying to calculate the time duration in business hours. The
open/close times are in the following format:

7/28/04 8:09 7/28/04 8:18
5/24/04 10:31 6/8/04 12:13
6/17/04 10:58 6/28/04 8:33

The current formula I'm using is:

=(DAY(B3-A3)*8 + HOUR(B3-A3)+MINUTE(B3-A3)/60)

But I need to account for weekends too. I initially thought that I
could shave off 2 days from 7 day periods, but realized that a three
day period could also include a weekend. Is there any way for excel to
determine if a day falls on a Saturday or Sunday? Any other ideas on
how I could account for weekends??


Thanks in advance.

Jackson



  #3   Report Post  
Myrna Larson
 
Posts: n/a
Default

You don't need DAY. This calculates the day of the month -- what you see when
you look at the calendar.

The straightforward formula B3-A3 calculates the number of days between two
dates.

I believe your formula should look more like this:

=(B3-A3)*8+HOUR(B3)-HOUR(A3)+MINUTE(B3)/60-MINUTE(A3)/60

i.e. you should apply the house and minute functions to the arguments
individually, not to the result of the subtraction.

On 4 Nov 2004 09:51:23 -0800, (Jackson) wrote:

I'm trying to calculate the time duration in business hours. The
open/close times are in the following format:

7/28/04 8:09 7/28/04 8:18
5/24/04 10:31 6/8/04 12:13
6/17/04 10:58 6/28/04 8:33

The current formula I'm using is:

=(DAY(B3-A3)*8 + HOUR(B3-A3)+MINUTE(B3-A3)/60)

But I need to account for weekends too. I initially thought that I
could shave off 2 days from 7 day periods, but realized that a three
day period could also include a weekend. Is there any way for excel to
determine if a day falls on a Saturday or Sunday? Any other ideas on
how I could account for weekends??


Thanks in advance.

Jackson


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Excel 2003 - long closing time when have many add-ins installed David Welch Excel Discussion (Misc queries) 0 January 11th 05 02:38 PM
How do I stop Excel from closing the open file each time I open a. Welsin Setting up and Configuration of Excel 3 January 8th 05 11:16 PM
Can't stop time duration [hh]:mm:ss converting to time of day Jack Cutrone Excel Discussion (Misc queries) 7 December 27th 04 11:23 PM
Converting an Excel formula to an Access query formula Adam Excel Discussion (Misc queries) 1 December 15th 04 03:38 AM


All times are GMT +1. The time now is 01:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"