Thanks for the responses guys. I'm not actually analyzing data really, its a daily activity report for my friend that works at the Ritz Carlton. Here was a macro that I found that does what I want, except 1: It doesn't Create the Sheets in the same workbook, it creates a new one and 2: I had previously tried the mid formula above to reference the sheet name in the cell, but I got a #VALUE error.
Option Explicit
Sub testme()
Dim iCtr As Long
Dim NewWkbk As Workbook
Dim HowMany As Long
Dim StartDate As Date
StartDate = DateSerial(Year(Date), Month(Date) + 1, 1)
StartDate = Application.InputBox _
(prompt:="Enter a date in the month you want", _
Type:=1, Default:=Format(StartDate, "mmmm dd, yyyy"))
If Year(StartDate) < 2005 _
Or Year(StartDate) > 2010 Then
Exit Sub
End If
'First of the month!
StartDate = DateSerial(Year(StartDate), Month(StartDate), 1)
HowMany = Day(DateSerial(Year(StartDate), Month(StartDate) + 1, 0))
Set NewWkbk = Workbooks.Add(1) 'single sheet
NewWkbk.Sheets.Add Count:=HowMany - 1
For iCtr = 1 To HowMany
NewWkbk.Worksheets(iCtr).Name _
= Format(StartDate - 1 + iCtr, "yyyy_mm_dd")
Next iCtr
End Sub
This one actually only created tabs by month, but that is fine. My friend just wants do create each month at a time without a whole lot of work because the employees using the spreadsheet aren't good with excel, so he didn't want to have them have to copy the sheets each day and set them up.
I attached a copy of the sheet that I want to duplicate
Bookmarks