T
Todd
Hi,
How do I get excel to calculate the first business day of
a period?
TIA
Todd
How do I get excel to calculate the first business day of
a period?
TIA
Todd
Hi,
How do I get excel to calculate the first business day of
a period?
TIA
Todd
Thank you,
I am trying to calcualate the date employee benefits would
start. It would be two periods in a month
one is on/before the 15th and the other is after the 15th.
So if qualified for benefits on/before the 15th what would
be the first business day of that month and if qualified
later what would the first business day after the 15th.
I have a seperate cell containing the dates and this is
what I had (of course it doesn't work).
=IF(DAY(H12)>15,H15-DAY(H12)+16,H12-DAY(H12)+1)
I tried replacing the day with work day but it returns #N/A
=IF(WORKDAY(H12)>15,H15-WORKDAY(H12)+16,H12-WORKDAY(H12)+1)
any ideas how to set this up better?
Todd
^^^^^OK, if I understand you correctly you have a date which could be in one of two
groups: either it is in the 1-15th of the month; or it is in the 16th to Last
Day of month.
Given that date, you want to know the first business day of the month,
and I
would assume that the first business day should not be a Saturday, Sunday or
Holiday.
Make sure that what happens when the qualification date falls on a weekend is
what you expect. For example, if the qualification date for an employee were
2/16/2003 (Sunday), then the first business date in the appropriate period
would be 2/17/2003 (Monday).
With your qualification date in A1, the first workday of the semi-monthly
period is:
=WORKDAY(DATE(YEAR(A1),MONTH(A1),15*(DAY(A1)>15)),1,Holidays)
The WORKDAY function requires that the Analysis Tool Pack be installed or else
you will get a #NAME error.
Holidays is a named range containing the dates of your holidays.
If you are not using a US version of Excel, carefully check the results as the
Analysis Tool Pack is rather US-Centric. I do have a VBA routine that will
work, but it runs much more slowly.
Ok, I am getting to understand all this. Thanks. I have
a similar situation the ends in the same question.
These dates have two options. Either I use the first
business day of the current month or the next one. If the
start date day is 01 then I use the first business day of
that month. All other dates become the first business day
of the next month.
I posted my formula below and its results. It works
Except that it returns the first day of the month if the
day in C1 =1 . Not the first business day.
=IF(DAY(C1)=1,WORKDAY(EOMONTH($C1,0),1),WORKDAY(EOMONTH
(C1,0),1))
Thanks!
Todd
Start Date Resulting Start Date
11/1/87 12/1/87
8/1/83 8/1/83
5/16/2001 6/1/01
5/1/2003 5/1/03
7/3/1996 8/1/96