Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Calculating calendar days excluding holidays

Need to determine a date by selecting a start date then add x days and
exclude holdays. (I know the formula for workdays excluding holidays) Need
to include weekend and exclude holidays
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default Calculating calendar days excluding holidays

Suppose start date in A1, end date in B1, holidays in column C :
=B1-A1-SUMPRODUCT((C1:C20=A1)*(C1:C20<=B1))
Do you need VBA syntax ?
Daniel

Need to determine a date by selecting a start date then add x days and
exclude holdays. (I know the formula for workdays excluding holidays) Need
to include weekend and exclude holidays



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Calculating calendar days excluding holidays

Thanks Daniel - below may be a better explanation of what I'm trying to
calculate.

My start date is 12/1/08, I need to add 60 days excluding holidays. I have
the holidays defline in a lookup table. The formula =workdays(a1-a2,holdays)
returns a date that excludes weekends and holidays. I need to include
weekends but exclude holidays.

"Daniel.C" wrote:

Suppose start date in A1, end date in B1, holidays in column C :
=B1-A1-SUMPRODUCT((C1:C20=A1)*(C1:C20<=B1))
Do you need VBA syntax ?
Daniel

Need to determine a date by selecting a start date then add x days and
exclude holdays. (I know the formula for workdays excluding holidays) Need
to include weekend and exclude holidays




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default Calculating calendar days excluding holidays

Sorry to have overlooked your problem.
Try :

Sub test()
'A1 = start date
'A2 = result
'B1 = days to add
'Column C = holidays
Dim Ctr As Integer, i As Integer
Do Until Ctr = [B1]
i = i + 1
If Not IsNumeric(Application.Match(([A1] + i) * 1, [C:C], 0))
Then
Ctr = Ctr + 1
End If
Loop
[A2] = [A1] + i
End Sub

Daniel

Thanks Daniel - below may be a better explanation of what I'm trying to
calculate.

My start date is 12/1/08, I need to add 60 days excluding holidays. I have
the holidays defline in a lookup table. The formula =workdays(a1-a2,holdays)
returns a date that excludes weekends and holidays. I need to include
weekends but exclude holidays.

"Daniel.C" wrote:

Suppose start date in A1, end date in B1, holidays in column C :
=B1-A1-SUMPRODUCT((C1:C20=A1)*(C1:C20<=B1))
Do you need VBA syntax ?
Daniel

Need to determine a date by selecting a start date then add x days and
exclude holdays. (I know the formula for workdays excluding holidays)
Need to include weekend and exclude holidays






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 + X days excluding holidays cousinexcel Excel Discussion (Misc queries) 1 January 27th 10 03:00 PM
Generating business days in a calendar month, EXCLUDING holidays jacob Excel Worksheet Functions 1 April 12th 05 05:38 AM
Generating business days in a calendar month, EXCLUDING holidays jacob Excel Worksheet Functions 0 April 12th 05 04:57 AM
How do you count work days excluding weekends and holidays? Hausma Excel Discussion (Misc queries) 2 April 8th 05 07:39 PM
formula to calculate # of days between dates, excluding holidays abs2299 Excel Discussion (Misc queries) 8 March 3rd 05 02:21 AM


All times are GMT +1. The time now is 09:27 PM.

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"