Auto-naming of Sheets ?

  • Thread starter Thread starter Anthony Slater
  • Start date Start date
A

Anthony Slater

Hi

I have a list of numbers all 8 digits in length (roughly
200 numbers).
I need a seperate worksheet for each number.

Is there a way of taking each number, inserting a
worksheet and naming it according to the number?

Thanks in advance
 
Thanks for that Andy.

Some good features there..
-----Original Message-----
Hi

This is one of the features of an add-in from www.asap- utilities.com It has
load of other useful functions too.

--
Andy.





.
 
Hi!

Copy the macro below to a new module, then select all cells with the names
in the sheet and run the macro.

Sub AddAndNameSheets()
Dim Cell As Object
For Each Cell In Selection
Sheets.Add
ActiveSheet.Name = Cell.Value
Next
End Sub

Best regards

Stefan Hägglund
Microsoft
 
Hi Anthony

this can be done using the following code ..

Sub makesheets()
Dim myrange As Range

Set myrange = Sheets("Sheet4").Range("A1:A210")

For Each c In myrange
Worksheets.Add
ActiveSheet.Name = c.Value
Next
End Sub

_______

where Sheet4 range A1:A210 is where the list of your 200 names are stored.

to use the code, right mouse click on a sheet tab, choose view code, choose
insert module from the menu, ... in the sheet of paper that comes up on the
right hand side of the screen, copy & paste the above in

Please let us know how you go
Cheers
JulieD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top