Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Removing Weekends From a Formula...

OK, so, I have the following data:

Batch Start Date and Time - 10/12/08 14:00
Batch Finish Date and Time - 15/12/08 16:55
Batch Duration - =SUM(B2-A2) Which supplies me with the answer: 5.12

However, we shut down over the weekend, so I need to remove the
weekend from the answer, which would give me 3.12.

Trying to do this using Networkdays doesn't seem to include the hours,
so I just get the answer 4, as it touched 4 working days.

Anyone know of something that could help me?

Thanks in advance!

Lee
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 896
Default Removing Weekends From a Formula...

try:

=IF(WEEKNUM(B2)WEEKNUM(A2),B2-A2-2,B2-A2)


On 10 Gru, 12:54, wrote:
OK, so, I have the following data:

Batch Start Date and Time - 10/12/08 14:00
Batch Finish Date and Time - 15/12/08 16:55
Batch Duration - =SUM(B2-A2) Which supplies me with the answer: 5.12

However, we shut down over the weekend, so I need to remove the
weekend from the answer, which would give me 3.12.

Trying to do this using Networkdays doesn't seem to include the hours,
so I just get the answer 4, as it touched 4 working days.

Anyone know of something that could help me?

Thanks in advance!

Lee


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Removing Weekends From a Formula...

Hi,

Try this

=(NETWORKDAYS(A2,B2)-1)+MOD(B2,1)-MOD(A2,1)

Firmkat as number to 2 decimal places.

Note that if you want this formula will acceot the Holidays argument

=(NETWORKDAYS(A2,B2,Holidays)-1)+MOD(B2,1)-MOD(A2,1)

Mike

" wrote:

OK, so, I have the following data:

Batch Start Date and Time - 10/12/08 14:00
Batch Finish Date and Time - 15/12/08 16:55
Batch Duration - =SUM(B2-A2) Which supplies me with the answer: 5.12

However, we shut down over the weekend, so I need to remove the
weekend from the answer, which would give me 3.12.

Trying to do this using Networkdays doesn't seem to include the hours,
so I just get the answer 4, as it touched 4 working days.

Anyone know of something that could help me?

Thanks in advance!

Lee

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Removing Weekends From a Formula...

The Networkdays function is part of the analysis tool pack. Be sure that is
installed or else you will get an error.

" wrote:

OK, so, I have the following data:

Batch Start Date and Time - 10/12/08 14:00
Batch Finish Date and Time - 15/12/08 16:55
Batch Duration - =SUM(B2-A2) Which supplies me with the answer: 5.12

However, we shut down over the weekend, so I need to remove the
weekend from the answer, which would give me 3.12.

Trying to do this using Networkdays doesn't seem to include the hours,
so I just get the answer 4, as it touched 4 working days.

Anyone know of something that could help me?

Thanks in advance!

Lee

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
Date Formula Excluding Weekends Dvinechild Excel Discussion (Misc queries) 3 April 2nd 08 09:10 PM
Can excel calc the difference between 2 dates removing weekends? Adam Excel Discussion (Misc queries) 1 August 14th 06 06:50 AM
removing weekends Dean Excel Worksheet Functions 6 July 21st 06 09:08 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


All times are GMT +1. The time now is 02:58 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"