ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Removing Weekends From a Formula... (https://www.excelbanter.com/excel-programming/421089-removing-weekends-formula.html)

[email protected]

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

Mike H

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


Jarek Kujawa[_2_]

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



DStrong

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



All times are GMT +1. The time now is 07:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com