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
- 2896 reads
Recent comments
5 years 34 weeks ago
6 years 20 weeks ago
6 years 32 weeks ago
6 years 35 weeks ago
6 years 36 weeks ago
6 years 42 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago