Dim s As Integer, d As Date, h As Integer d = CDate(InputBox("Введите дата начала графика", , "2016/01/02")) Do While s < 176 h = Weekday(d, vbMonday) If h <> 7 Then s = s + 8 Cells(i + 1, 2) = s Cells(i + 1, 3) = d End If Cells(i + 1, 4) = h i = i + 1 d = d + 1 Loop
d = CDate(InputBox("Введите дата начала графика", , "2016/01/02"))
Do While s < 176
h = Weekday(d, vbMonday)
If h <> 7 Then
s = s + 8
Cells(i + 1, 2) = s
Cells(i + 1, 3) = d
End If
Cells(i + 1, 4) = h
i = i + 1
d = d + 1
Loop