Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Sheets Based on Cell Contents...

Status
Not open for further replies.

tweek312

Technical User
Dec 18, 2004
148
0
0
US
I would like to create a macro which creates sheets based on information in a range of cells. The range is static in position however its length changes often. The contents is simple text (no formulas) and needs to have one sheet for each item in the range.

Example:

AGUIRRK
ARMSTEA
BARRONR
BLACKS
BLANDS
BROWNA2
BROWNE3
CARSONLV

Say the names usernames above are my range. I need to create a "NEW" sheet for each username and then I will have a filter operation to break data containing these usernames out into their appropriate sheets.

I have the filter operation however I am not sure where to start for the creating of the sheets on the fly. The amount of sheets to be made on a single sheet will vary from 3 to nearly 50 items.

I have found somthing about an AutoCreateSheet function however my biggest problems is getting the code to use the data on my sheet.

Thanks to anyone who wishes to contribute.

tW33k...
 
you will need to loop through a range picking up the cell value and using the Add method of the Sheet object

To obtain your range definition, you will need to know where the last row is - there are 2 seperate FAQs on how to do this in the FAQs section of this forum

look up the bolded words in the help files to understand how to utilise these objects
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top