|When you use the word "code" I assume you mean "formula", correct?|
The word "code" is usually used with VBA or other programming languages.
Each day in Excel is equal to "1". You can simply add 1 (or 7) to a cell to increase the date.
This site might help...
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.