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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2003 -

Status
Not open for further replies.

marisam

Technical User
Mar 31, 2006
57
US
I have a spreadsheet with 8000 records. It is sorted by the car type. There are 70 car types. I would like to create a separate excel file for each car type. Is there a script I can use to do that?
SPREADSHEET
APP CAR TYPE
01 ACURA
02 ACURA
03 TOYOTA
From the above spreadsheet I'd like to create 2 separate files: acura and toyota.

Thanks
 
In the title I meant to write Separate worksheet into files.
 



Turn on your macro recorder and record doing this for one...

AutoFilter the table for one car type.

select the table

Copy

Insert a new sheet

Edit/Paste Special - VALUES

right-click the sheet tab and move the sheet to a new workbook.

Save the workbook and CLOSE

Post you code in VBA Visual Basic for Applications (Microsoft) Forum707 -- NOT in this Forum.

Skip,

[glasses] [red][/red]
[tongue]
 
Depending on how many fields you have in your data, you might also want to throw a Pivot table at it, drag in all the data fields you want and then drag CAR up into the page fields. Now using the Pivot Table toolbar hit the 'Show Pages' icon and then choose CAR and it will create a sheet for every car.

Regards
Ken............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top