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
- 2937 reads
Recent comments
5 years 41 weeks ago
6 years 27 weeks ago
6 years 39 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 48 weeks ago
7 years 4 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago