Create new sheets

upwordz

New Member
Joined
Oct 27, 2005
Messages
13
I have an excel sheet (version 2010) with 359 company names in col A. I need to create a sheet for each of those names. I have been doing this manually and I've completed 129 so far but this is super tedious!

Is there an easier way for me to do this? I've never written a VBA script or a macro but I do know some programming languages so I'm pretty fearless. :)
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
This code will do what you want, but you are only creating the worksheet nothing more?
Sub createSheet1()
Dim MyCel As Range, MyRange As Range

Set MyRange = Sheets("sheet1").Range("A2")
Set MyRange = Range(MyRange, MyRange.End(xlDown))
For Each MyCel In MyRange
Sheets.Add After:=Sheets(Sheets.Count) 'creates a new worksheet
Sheets(Sheets.Count).Name = MyCel.Value ' renames the new sheet
Next MyCel
End Sub
 
Upvote 0
Thanks Trevor, that's correct. I am manually screen scraping table data from a UK website which is not consistent in how they present their data. Sometimes it is structured as in the example I linked to and other times it has to be fix width delimited or worse. This will save me a good bit of time! Cheers.
 
Upvote 0
In thinking about this a little further, I am using the same 5 COL header row for all sheets. Is that easy to add?

Am I correct in assuming the following:
1. I replace sheet1 with the name of the sheet that contains the company names?
2. I replace A2 with the cell for the next company I need to do next? (in my case that would be A178)
3. I leave everything else alone?

Cheers,
Darren
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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