Name worksheets dependant on Cell entries
Hi Ewan,
I am trying (and failing) to create a macro in a master
document that will
copy a template sreadsheet 'n' number of times where 'n'
is determined by the
users' entries (countif non-blank cells of cost centre
names column) in a
setup sheet (there is a maximum of 50 cost centres that
can be entered).
try:
m = Range("yourentrycell").Value
for i=1 to m
Workbooks("abcd.xls").Sheets.Add
Workbooks.Sheets(i).Name = Range("names").Offset(i,
0).Value
i = i + 1
Next i
With that you create i new sheets with the names in
column "names".
Best
Markus
|