Quote Originally Posted by Bob Phillips View Post
How about

=(WORKDAY(A5-1,1,holidays)=A5)*8

where holidays is the range of holiday dates
I made a VBA code for dates of the holidays,.but how to apply the formula.
Code looks like this:
Public Function holiday(lngdate As Long) As Boolean
Dim inputyear As Integer, es As Long, ok As Boolean

If lngdate <= 0 Then lngdate = Date
inputyear = Year(lngdate)
es = eastersunday(inputyear)
ok = True
Select Case lngdate
Case DateSerial(inputyear, 1, 1)
Case DateSerial(inputyear, 1, 6)

Case es
Case es + 1
Case DateSerial(inputyear, 5, 1)

Case es + 60
Case DateSerial(inputyear, 6, 22)
Case DateSerial(inputyear, 6, 25)
Case DateSerial(inputyear, 8, 5)
Case DateSerial(inputyear, 8, 15)
Case DateSerial(inputyear, 10, 8)
Case DateSerial(inputyear, 11, 1)
Case DateSerial(inputyear, 12, 25)
Case DateSerial(inputyear, 12, 26)
Case Else
ok = False
End Select
holiday = ok
End Function