Option Explicit
Sub WypelnijDatami()
Dim startDate As Date
Dim endDate As Date
Dim currDate As Date
Dim i As Integer
startDate = Range("B1").Value
endDate = Range("B2").Value
currDate = startDate - 3 'trzy dni wcześniej
i = 1 'wartość do "indeksowania" komórek
Do While (currDate <= endDate)
Cells(i, 4).Value = currDate
currDate = currDate + 1
i = i + 1
Loop
End Sub
Powodzenia! |