Add new sheet and rename sheet from list

Alpacino

Well-known Member
Joined
Mar 16, 2011
Messages
511
Hi,

I want a macro that will add new worksheets and rename them from a list of names in range a1 to a35 sheet1 so I will have 35 new worksheets with names from list.

Thanks
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
See if this gets you started:

<font face=Calibri><SPAN style="color:#00007F">Sub</SPAN> AddSheets()<br>    <SPAN style="color:#00007F">Dim</SPAN> i <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN><br>    <SPAN style="color:#00007F">Dim</SPAN> ws <SPAN style="color:#00007F">As</SPAN> Worksheet<br>    <br>        <SPAN style="color:#00007F">Set</SPAN> ws = Sheets("Sheet1") <SPAN style="color:#007F00">' Change to whatever sheet the names are in</SPAN><br>        <br>        <SPAN style="color:#00007F">For</SPAN> i = 1 <SPAN style="color:#00007F">To</SPAN> ws.Cells(Rows.Count, "A").End(xlUp).Row<br>            Sheets.Add After:=Sheets(Sheets.Count)<br>            ActiveSheet.Name = ws.Cells(i, "A").Value<br>        <SPAN style="color:#00007F">Next</SPAN> i<br>        <br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

Note there's no error handling to check for valid sheet names, or if a sheet already exists.

HTH,
 
Upvote 0

Forum statistics

Threads
1,224,559
Messages
6,179,517
Members
452,921
Latest member
BBQKING

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top