excel worksheet re-nameing

M

Matt

I have an excel spreadsheet, the worksheets are named in date order by day (3 months) I want to be able to change the first 1 and have all the others change to the subsequent dates, is this possible
 
R

Rollin_Again

You will need a macro to do this. What is the exact date format tha
you are using for each of the sheet names? Post back with the exac
name of the first few sheets exactly as they appear on the workboo
tabs.


Rolli
 
R

Rollin_Again

Here is a sample macro that uses the following format for each of th
tab names *Jan 1, 2004*. Change the name of the first sheet of th
workbook to the first date you want (use the same format as the bolde
date above) and then run the macro below.


Code
-------------------

Public Sub ChangeDates()

Sheets(1).Select
vDate = CDate(ActiveSheet.Name)

For i = 2 To Sheets.Count

vDate = vDate + 1
vDate = Format(vDate, "mmm d, yyyy")
Sheets(i).Name = vDate
vDate = CDate(vDate)

Next i

End Su
 
Top