XLA routines: EE_NextBusinessDay
EE_NextBusinessDay takes a date, and a holiday calendar and returns the next business day.
Function EE_NextBusinessDay(rngHolidays As range, dt As Date) As Date 'Takes a date, a range of holidays, and returns the next business day Dim intNext As Integer Dim dtNext As Date 'http://excelexperts.com/xla-routines-eeNextBusinessDay for updates on this function intNext = 1 Do While True dtNext = DateAdd("d", intNext, dt) If EE_IsBusinessDay(rngHolidays, dtNext) Then EE_NextBusinessDay = dtNext Exit Function End If intNext = intNext + 1 Loop End Function
»
- Nick's blog
- Login or register to post comments
- 2838 reads
Recent comments
5 years 42 weeks ago
6 years 28 weeks ago
6 years 40 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 49 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago