XLA routines: EE_IsBusinessDay
EE_IsBusinessDay is a very useful financial function that returns whether a date is a business day. To use the function, pass in a range containing the holidays that you want the function to consider as non-business days
Function EE_IsBusinessDay(rngHolidays As range, dt As Date) As Boolean 'Takes a range containing a list of holidays, and a date, and returns if the day is a business day. Dim rngDate As range 'http://excelexperts.com/xla-routines-eeIsBusinessDay for updates on this function For Each rngDate In EE_RangeTrim(rngHolidays) If CDate(rngDate) = dt Then EE_IsBusinessDay = False Set rngDate = Nothing Exit Function End If Next rngDate EE_IsBusinessDay = EE_IsWeekday(dt) Set rngDate = Nothing End Function
»
- Nick's blog
- Login or register to post comments
- 2907 reads
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago