ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Fill series of dates across worksheets in excel (https://www.excelbanter.com/excel-worksheet-functions/218831-fill-series-dates-across-worksheets-excel.html)

Valhumf

Fill series of dates across worksheets in excel
 
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 ...

Many thanks, Val :)

Gord Dibben

Fill series of dates across worksheets in excel
 
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


On Mon, 2 Feb 2009 17:05:01 -0800, Valhumf
wrote:

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 ...

Many thanks, Val :)




All times are GMT +1. The time now is 08:40 AM.

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