Putting single dates across many pages - Microsoft Community
Office / Excel / Other/unknown / Office 2013
hi! i'm trying create sheets in excel automatically fill in date , day on separate sheets (yeah, 365 total sheets). need 1 page per day. how can this?
thank help.
format sheet1 wish.
run macro copy sheet 365 times naming each 1-jan 1 through 31-dec
feb 29 sheet have added manually if needed
sheet1 can deleted after running.
sub makesheetforeachday()
'will copy sheet named "sheet1" , rename as
'as date, 1-jan, 2-jan, etc.
dim wsstart worksheet
dim strdate string
dim mth long, dy long
workbooks.add
set wsstart = sheets("sheet1")
mth = 1 12
dy = 1 day(dateserial(year(now), mth + 1, 1) - 1)
strdate = format(dateserial(year(now), mth, dy), "d-mmm")
wsstart.copy after:=sheets(sheets.count)
sheets(sheets.count).name = strdate
next dy
next mth
end sub
gord
Office / Excel / Other/unknown / Office 2013
Comments
Post a Comment