Look if you are going to cut and paste scripts/macros/vbscripts....
....please understand how to reverse engineer the code at least.....
...at this point you have earned yourself the title of......
[HORNS BLOW AND A BUNCH OF FANFAIR]
You must qualify your variables as follows, according to th3 script you cut....
y Day of year
there really isn't a single programmer that will make it easy (for another programmer)!
Try some stuff and let us know where you are stuck!