2023年金融节假日函数,平时处理数据会经常用。copy即可!
Function financeDay(date1 As Date, x As Integer)
Dim arr(1 To 18) As Date
Dim date2 As Date
arr(1) = #1/2/2023#
arr(2) = #1/23/2023#
arr(3) = #1/24/2023#
arr(4) = #1/25/2023#
arr(5) = #1/26/2023#
arr(6) = #1/27/2023#
arr(7) = #4/5/2023#
arr(8) = #5/1/2023#
arr(9) = #5/2/2023#
arr(10) = #5/3/2023#
arr(11) = #6/22/2023#
arr(12) = #6/23/2023#
arr(13) = #9/29/2023#
arr(14) = #10/2/2023#
arr(15) = #10/3/2023#
arr(16) = #10/4/2023#
arr(17) = #10/5/2023#
arr(18) = #10/6/2023#
date2 = Application.WorksheetFunction.WorkDay(date1, x, arr)
financeDay = date2
End Function