【发布时间】:2021-06-12 20:36:33
【问题描述】:
我正在 Office 2016 中尝试 networkdays 循环,但没有通过。
Sub Macro8()
Dim N As Long
Dim wf As WorksheetFunction
Set wf = Application.WorksheetFunction
N = Sheets("Dump").Range("A" & Rows.Count).End(xlUp).Row
Range("E1") = Date 'i want to use today's date as lastest date to find the networkdays
For i = 2 To N
Cells(i, 4).Formula = wf.NetworkDays(Cells(i, 3), Cells(1, 5))
Next N
End Sub
【问题讨论】: