ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Printing dates (https://www.excelbanter.com/excel-discussion-misc-queries/203870-printing-dates.html)

bpreilly

Printing dates
 
how can i print consecutive dates on multiple copies of the same worksheet?
"monday may 1st" tuesday may 2nd" and so on

Sheeloo[_2_]

Printing dates
 
If you know VBA then you may adapt the solution given at
http://answers.yahoo.com/question/in...3010236AAS7xuE

"bpreilly" wrote:

how can i print consecutive dates on multiple copies of the same worksheet?
"monday may 1st" tuesday may 2nd" and so on


Dave Peterson

Printing dates
 
You could provide a dedicated macro that adjusts the dates and does the
printing.

Option Explicit
Sub testme()
Dim StartDate As Date
Dim HowMany As Long
Dim dCtr As Long

StartDate = DateSerial(2008, 9, 25)
HowMany = 12

With Worksheets("sheet1")
For dCtr = StartDate To (StartDate + HowMany)
With .Range("A1")
.NumberFormat = "dddd mmmm dd, yyyy"
.Value = dCtr
.EntireColumn.AutoFit
End With
.PrintOut preview:=True
Next dCtr
End With

End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

bpreilly wrote:

how can i print consecutive dates on multiple copies of the same worksheet?
"monday may 1st" tuesday may 2nd" and so on


--

Dave Peterson


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com