VBA: Create sheets from list

jdamushte 1 Posts Friday July 20, 2018Registration date July 20, 2018 Last seen - Jul 20, 2018 at 09:48 AM - Latest reply: TrowaD 2438 Posts Sunday September 12, 2010Registration dateModeratorStatus October 16, 2018 Last seen
- Jul 24, 2018 at 11:44 AM
Hello,
suppose i have value in column A from 1 to 10 then i want to create a sheet from 1 to 10 using macro



See more 

Your reply

2 replies

ac3mark 10650 Posts Monday June 3, 2013Registration dateModeratorStatus October 16, 2018 Last seen - Jul 20, 2018 at 10:35 AM
0
Thank you
So record a macro of it and do it!

Highlight the row, cut it, select the tab, new tab, rename it "1", highlight the first row, paste the row!

It is that simple!

Have FUN!
Respond to ac3mark
TrowaD 2438 Posts Sunday September 12, 2010Registration dateModeratorStatus October 16, 2018 Last seen - Jul 24, 2018 at 11:44 AM
0
Thank you
Since the macro recorder doesn't show you how to loop, give this code a try:
Sub RunMe()
For Each cell In Range("A1:A10")
    Sheets.Add
    ActiveSheet.Name = cell.Value
Next cell
End Sub


Or, when you want the order of sheets reversed:
Sub RunMe()
For Each cell In Range("A1:A10")
    Sheets.Add after:=Sheets(Sheets.Count)
    ActiveSheet.Name = cell.Value
Next cell
End Sub


Best regards,
Trowa
Respond to TrowaD