excel - Fill in Dates by week? -
is there way fill column week week including weekends? example:
a2 = 12/04/2015
a3 = 19/04/2015
a4 = 26/04/2015....
my current code follows:
sub filldates() sheet1.range("a2") .value = dateserial(2015, 4, 12) .autofill .resize(1102, 1), xlfilldays end end sub
i have tried code weekdays, months , individual days doesn't satisfy want, there way fill each corresponding cell in column weekly dates?
if put sunday's date in a2
, next sunday's date in a3
select a2:a3
, fill down, there sunday's dates filled because there ever 7 days difference between sundays , default fill behavior fill series difference of selected cells.
sub filldates() sheet1.range("a2") .value = dateserial(2015, 4, 12) .offset(1, 0).value = .value + 7 .resize(2, 1).autofill destination:=.resize(1102, 1) end end sub
Comments
Post a Comment