Create multiple worksheets from list
I'd do this with a named range for the list and then create the worksheets
based upon that named range.
Let's say you have the header for the days in A1 and the list in A2- ... A n
where n is variable.
Create a worksheet level named range (I'll call it DateList) with
=offset(Sheet1!$A$1,1,0,counta(Sheet1!$A:$A)-1,1)
For your macro, do the following:
dim myRange as range
dim r as range
set myRange = nothing
on error resume next
set myRange = range("DateList")
on error goto 0
if not myRange is nothing then
for each r in myRange
Worksheets.Add(after:=Worksheets(Worksheets.Count) ).Name = r.value
next r
end if
Good luck!
"KDP" wrote:
i have a generic workbook that i create every month with sheets at the bottom
of the days of the month.
Is there anyway that i could create a macro to automatically create the
worksheets from a list of the dates needed?
|