Hi,
I am trying to create worksheets and naming them automatically depending on the name you input in various cells in another worksheet... For example:
In worksheet 1, i have cells A1, A2, A3, A4, A5, ....
If I input "costs" in cell A1, then it will create a new worksheet called "costs".
If I then also input "income" in cell A2, it will also create a new worksheet after the "costs" worksheet called "income".
And so on...
Does anyone know a simple way of doing this?
Any help appreciated...
Thanks!
E.
sample code for the same
Code:Sub create_sheets() Cells(1, 1).Activate Set cur = ActiveCell.CurrentRegion For Each xcell In cur Worksheets.Add ActiveSheet.Name = xcell Next xcell End Sub
Shijesh Kumar
http://shijesh.wordpress.com/
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks