thanks
Yah no problem, i place it my personal.xls it do works without sweat...good
job u have done for this question.
In my 6 day a week schedule, my boss real problem now is based on the real
world wherein if holiday falls on sunday, then monday has to be a holiday
too, same goes for holiday that falls on friday then saturday has to be
considered as holiday too...following local labor code...
i hope u can say something about this...in this forum or thru other means.
happy holidays
romelsb
"Gary''s Student" wrote:
See:
http://support.microsoft.com/?id=211563
--
Gary's Student
"dribler2" wrote:
Hi Gary''s Student
please explain how to set this as an add-in.
thanks again
dribler2
"Gary''s Student" wrote:
How about:
Function counter2(d1 As Range, d2 As Range, hl As Range) As Integer
d1v = DateValue(d1.Value)
d2v = DateValue(d2.Value)
c = 0
For Each r In hl
dh = DateValue(r.Value)
c = c - (dh = d1v And dh <= d2v)
Next
counter2 = c
End Function
If A1 contains: 1/1/2006
and B1 contains:1/1/2007
and the holiday list is in C1 thru C5:
1/1/2006
1/1/2007
7/4/2006
1/18/2006
7/4/2007
Then =counter2(A1,B1,C1:C5)
returns 4 - the number of holidays between A1 and B1
--
Gary's Student
"dribler2" wrote:
for anyone to help
I am still uncapable of making a short lookup formula something like this
=lookup(date1:date2, holidays datelist)
i want to count how many holidays are included between 2 given dates.
thanks for kind help
driller