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
- 2875 reads
Recent comments
5 years 47 weeks ago
6 years 33 weeks ago
6 years 45 weeks ago
6 years 48 weeks ago
6 years 49 weeks ago
7 years 2 weeks ago
7 years 10 weeks ago
7 years 11 weeks ago
7 years 11 weeks ago
7 years 11 weeks ago