PC Review


Reply
Thread Tools Rate Thread

Calculating calendar days excluding holidays

 
 
Mickey
Guest
Posts: n/a
 
      24th Oct 2008
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 With Quote
 
 
 
 
Daniel.C
Guest
Posts: n/a
 
      24th Oct 2008
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 With Quote
 
Mickey
Guest
Posts: n/a
 
      25th Oct 2008
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 With Quote
 
Daniel.C
Guest
Posts: n/a
 
      25th Oct 2008
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date + X days excluding holidays cousinexcel Microsoft Excel Misc 1 27th Jan 2010 03:00 PM
Help with calculating date excluding holidays =?Utf-8?B?QWw=?= Microsoft Access Form Coding 3 11th Oct 2007 06:56 PM
Generating business days in a calendar month, EXCLUDING holidays jacob Microsoft Excel Worksheet Functions 1 12th Apr 2005 05:38 AM
Generating business days in a calendar month, EXCLUDING holidays jacob Microsoft Excel Worksheet Functions 0 12th Apr 2005 04:57 AM
Calculating dates excluding weekends/holidays? Mark Microsoft Access Queries 7 27th Jul 2004 12:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:47 PM.