Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have to do a worksheet where I have to specify data for 2010, one week in
each sheet. For the sheets name I have to consider a work week, so the sheets name should be: Sheet1: 04-01-10 to 08-01-10 Sheet2: 11-01-10 to 15-01-10 and so on Is there a way to do this automatically? Thanks in advance. Regards Emece.- |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can try out the below macro. If you are new to macros..
--Set the Security level to low/medium in (Tools|Macro|Security). --From workbook launch VBE using short-key Alt+F11. --From menu 'Insert' a module and paste the below code. --Get back to Workbook. --Run macro from Tools|Macro|Run <selected macro() Sub Macro() Dim ws As Worksheet, dtStart As Date, intCount As Integer dtStart = "04-Jan-2010" For intCount = 1 To 52 Set ws = Worksheets.Add(After:=Worksheets(Worksheets.Count) ) ws.Name = Format(dtStart, "dd-mm-yy") & " to " & _ Format(dtStart + 4, "dd-mm-yy") dtStart = dtStart + 7 Next End Sub -- Jacob "Emece" wrote: I have to do a worksheet where I have to specify data for 2010, one week in each sheet. For the sheets name I have to consider a work week, so the sheets name should be: Sheet1: 04-01-10 to 08-01-10 Sheet2: 11-01-10 to 15-01-10 and so on Is there a way to do this automatically? Thanks in advance. Regards Emece.- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I print sheets in Excel without blank sheets after page | New Users to Excel | |||
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA | Excel Worksheet Functions | |||
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? | Excel Worksheet Functions | |||
In 3 active sheets in wkbk, determine& display the # of sheets that have data | Excel Discussion (Misc queries) | |||
populating sheets based on data from parent sheets | Excel Discussion (Misc queries) |