Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Im making a daily procedures list in excel but need to print it off a month in advance to go around the work place. I want the date at the top but dont want to type it in everytime then hit print. Is their a way similiar to a mail merge in Word where you can hit merge to printer and print a month in advance so the date comes out automatically?
thanks for anyone that can help

I'm not sure what you are trying to do.
Do you want a cell that will always show a date that is one month from the current date?
Look up EDATE() in Excel help.
=EDATE(TODAY(),1)

Yes you can do this with a macro.
You'll have to change the sheet name (anywhere it says "Sheet1"), and the range (anywhere it says "A1") where you have the date inputted.
Also I don't know if you need it or not, but I've set this to only print out weekdays (Mon-Fri) assuming you're using the standard 1900 windows date system. If you don't want it to do this (i.e. you want a printout for every day, including Saturdays and Sundays), you need to remove the lines I've put 'OPTIONALLY REMOVE at the end of.
To enter a macro, you need to press ALT-F11 in your spreadsheet, which brings up the VBA editor. Then go to Insert/Module and copy paste the code below. To run the macro, from a spreadsheet press ALT-F8, highlight "plusdate" and click "Run".
Sub plusdate()Sheet1.PrintOut
For i = 1 To 31
Worksheets("Sheet1").Range("A1").Formula = Worksheets("Sheet1").Range("A1").Value + 1
If Worksheets("Sheet1").Cells(1, 1).Value Mod 7 > 1 Then 'OPTIONALLY REMOVE
Worksheets("Sheet1").PrintOut
End If 'OPTIONALLY REMOVE
Next i
End Sub

oops you need to change the bit that says Cells(1,1) to Range("A1") as well. Full code:
Sub plusdate()Sheet1.PrintOut
For i = 1 To 31
Worksheets("Sheet1").Range("A1").Formula = Worksheets("Sheet1").Range("A1").Value + 1
If Worksheets("Sheet1").Range("A1").Value Mod 7 > 1 Then 'OPTIONALLY REMOVE
Worksheets("Sheet1").PrintOut
End If 'OPTIONALLY REMOVE
Next i
End Sub

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |