Fill series of dates across worksheets in excel

  • Thread starter Thread starter Valhumf
  • Start date Start date
V

Valhumf

Please help.

I have created a workbook in excel with 31 worksheets, one for each day of
the month. Is there a way that I can enter the date within the 1st worksheet
and then use a format or formular so that each new worksheet will display the
following days date?

You can also contact me at (e-mail address removed)...

Many thanks, Val :)
 
I would use a macro.

Sub Date_Increment()
'increment a date in A1 across sheets
Dim myDate As Date
Dim iCtr As Long
myDate = Sheets("Sheet1").Range("A1").Value 'adjust name and cell
For iCtr = 2 To Worksheets.Count
With Worksheets(iCtr).Range("A1") 'adjust cell
.Value = myDate - 1 + iCtr
.NumberFormat = "mm-dd-yyyy"
End With
Next iCtr
End Sub

Another method which also uses VBA is a uer defined function.

See this thread for more info on PrevSheet function.

http://tinyurl.com/blv5o8

In your case, enter the date in A1 on Sheet1.

Group sheets 2 through 31 and enter =PrevSheet(A1) +1


Gord Dibben MS Excel MVP
 
Back
Top