Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default removing weekends

I am only wanting to count the hours between two dates that fall on Monday
thru Friday. In other words, I want to always exclude counting hours on
Weekends

The data is in the format of
6/27/06 12:10 - say that this is in cell A1
7/20/06 09:34 - say that this is in cell B1

=B1-A1
How do I do this ?
Thx for your assistance, it is much appreciated
- Dean

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dav Dav is offline
external usenet poster
 
Posts: 1
Default removing weekends


a few answers may mean this is simple do any activities start or finish
on a saturday or sunday? if the answer is no
and the answer to activites lasting more than a week is also no

then

=IF(WEEKDAY(a1,2)-WEEKDAY(b1,2)0,b1-a1-2,b1-a1)

if a week can be exceded but still no finishes or starts on sat or sun

=IF(WEEKDAY(A1,2)-WEEKDAY(B1,2)0,B1-A1-2*(1+TRUNC((B1-A1)/7)),B1-A1-2*TRUNC((B1-A1)/7))

regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=563847

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 258
Default removing weekends

Dean --

Don't know if you meant work hours or clock hours. Here's a formula for
work hours:

A
1 Start date/time
2 End date/time
3
4 =NETWORKDAYS(A1,A2)*8+(HOUR(A2)-HOUR(A1))

You can set it up to ignore holidays as well; it's got good documentation in
'help'.

HTH

"Dean" wrote:

I am only wanting to count the hours between two dates that fall on Monday
thru Friday. In other words, I want to always exclude counting hours on
Weekends

The data is in the format of
6/27/06 12:10 - say that this is in cell A1
7/20/06 09:34 - say that this is in cell B1

=B1-A1
How do I do this ?
Thx for your assistance, it is much appreciated
- Dean

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default removing weekends

pdberger,
Thx for replying -
If you mean Workhours is only considering (8), that could be the situation
needed, my boss hasn't decided if he wants to base the difference on (8) hrs
per day or as whole days of (24) hours. So, I guess it would be good to know
ways to do both. Dean

"pdberger" wrote:

Dean --

Don't know if you meant work hours or clock hours. Here's a formula for
work hours:

A
1 Start date/time
2 End date/time
3
4 =NETWORKDAYS(A1,A2)*8+(HOUR(A2)-HOUR(A1))

You can set it up to ignore holidays as well; it's got good documentation in
'help'.

HTH

"Dean" wrote:

I am only wanting to count the hours between two dates that fall on Monday
thru Friday. In other words, I want to always exclude counting hours on
Weekends

The data is in the format of
6/27/06 12:10 - say that this is in cell A1
7/20/06 09:34 - say that this is in cell B1

=B1-A1
How do I do this ?
Thx for your assistance, it is much appreciated
- Dean

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 258
Default removing weekends

Dean --

Wasn't sure from your response if you saw just to change the 8 to 24
depending on what your boss wants.

"Dean" wrote:

pdberger,
Thx for replying -
If you mean Workhours is only considering (8), that could be the situation
needed, my boss hasn't decided if he wants to base the difference on (8) hrs
per day or as whole days of (24) hours. So, I guess it would be good to know
ways to do both. Dean

"pdberger" wrote:

Dean --

Don't know if you meant work hours or clock hours. Here's a formula for
work hours:

A
1 Start date/time
2 End date/time
3
4 =NETWORKDAYS(A1,A2)*8+(HOUR(A2)-HOUR(A1))

You can set it up to ignore holidays as well; it's got good documentation in
'help'.

HTH

"Dean" wrote:

I am only wanting to count the hours between two dates that fall on Monday
thru Friday. In other words, I want to always exclude counting hours on
Weekends

The data is in the format of
6/27/06 12:10 - say that this is in cell A1
7/20/06 09:34 - say that this is in cell B1

=B1-A1
How do I do this ?
Thx for your assistance, it is much appreciated
- Dean



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default removing weekends

That's great, what a help. Thx again. Dean

"pdberger" wrote:

Dean --

Wasn't sure from your response if you saw just to change the 8 to 24
depending on what your boss wants.

"Dean" wrote:

pdberger,
Thx for replying -
If you mean Workhours is only considering (8), that could be the situation
needed, my boss hasn't decided if he wants to base the difference on (8) hrs
per day or as whole days of (24) hours. So, I guess it would be good to know
ways to do both. Dean

"pdberger" wrote:

Dean --

Don't know if you meant work hours or clock hours. Here's a formula for
work hours:

A
1 Start date/time
2 End date/time
3
4 =NETWORKDAYS(A1,A2)*8+(HOUR(A2)-HOUR(A1))

You can set it up to ignore holidays as well; it's got good documentation in
'help'.

HTH

"Dean" wrote:

I am only wanting to count the hours between two dates that fall on Monday
thru Friday. In other words, I want to always exclude counting hours on
Weekends

The data is in the format of
6/27/06 12:10 - say that this is in cell A1
7/20/06 09:34 - say that this is in cell B1

=B1-A1
How do I do this ?
Thx for your assistance, it is much appreciated
- Dean

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default removing weekends

Dav,
I'll give your info a try, I think I got what I needed from pdberger.
Thanks for your reply. Dean

"Dav" wrote:


a few answers may mean this is simple do any activities start or finish
on a saturday or sunday? if the answer is no
and the answer to activites lasting more than a week is also no

then

=IF(WEEKDAY(a1,2)-WEEKDAY(b1,2)0,b1-a1-2,b1-a1)

if a week can be exceded but still no finishes or starts on sat or sun

=IF(WEEKDAY(A1,2)-WEEKDAY(B1,2)0,B1-A1-2*(1+TRUNC((B1-A1)/7)),B1-A1-2*TRUNC((B1-A1)/7))

regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=563847


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
WEEKENDS VS. WEEKDAYS TLAngelo Excel Discussion (Misc queries) 0 July 10th 06 06:49 PM
Removing holidays and weekends , networkdays amyk1313 Excel Discussion (Misc queries) 1 May 30th 06 05:29 PM
Removing holidays and weekends , networkdays amyk1313 Excel Discussion (Misc queries) 0 May 30th 06 05:17 PM
Schedule to exclude weekends and holidays Erin D. Excel Discussion (Misc queries) 3 March 15th 05 09:49 PM
Date difference taking into account weekends. annonymous Excel Worksheet Functions 3 March 14th 05 05:35 PM


All times are GMT +1. The time now is 11:00 AM.

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

About Us

"It's about Microsoft Excel"