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
- 2934 reads
Recent comments
6 years 6 weeks ago
6 years 44 weeks ago
7 years 4 weeks ago
7 years 7 weeks ago
7 years 8 weeks ago
7 years 13 weeks ago
7 years 21 weeks ago
7 years 22 weeks ago
7 years 22 weeks ago
7 years 22 weeks ago