ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excluding week-end days/hours (https://www.excelbanter.com/excel-programming/306432-excluding-week-end-days-hours.html)

Marie-Claire Smeets

Excluding week-end days/hours
 
Can somebody help me to get me on track for the following. To do some
'action-reaction' calculation via a VBA macro I need to exclude week-end
days/hours out of my result.

Please find below an example with the criteria that should be taken into
account.


Action date Reaction date Hours without week-end
5/aug/2004 9/aug/2004 ? hours
9/aug/2004 22/jul/2004 ? hours


Conditions to be taken into account a

- VBA macro should exclude week-end days
- Week-end starts Friday after 5.00 o'clock PM and ends on Monday
08.00 AM






Many thanks for anybody who had already some VBA experience in this area.

B.rgds,
MC



Peter Atherton[_3_]

Excluding week-end days/hours
 

-----Original Message-----
Can somebody help me to get me on track for the

following. To do some
'action-reaction' calculation via a VBA macro I need to

exclude week-end
days/hours out of my result.

Please find below an example with the criteria that

should be taken into
account.


Action date Reaction date Hours without week-end
5/aug/2004 9/aug/2004 ? hours
9/aug/2004 22/jul/2004 ? hours


Conditions to be taken into account a

- VBA macro should exclude week-end days
- Week-end starts Friday after 5.00 o'clock PM and

ends on Monday
08.00 AM


Many thanks for anybody who had already some VBA

experience in this area.

B.rgds,
MC

MarieC

Something like this will start you off

Dim c
Dim t As Double

For Each c In Selection
If Weekday(c) = 6 Or Weekday(c) = 6 _
Or Weekday(c) = 5 And t 0.70833 Then
' your code
End If
Next

Regards
Peter




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

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