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

export some specific fields from excel to another file

Status
Not open for further replies.

unixisgood

Technical User
Jan 26, 2005
25
GB
Hi all,
I need a VB code to export some specific fields from excel and import them another excel file created.

The original excel file has 8 worksheet in it and Data is in Worksheet #2 ,4, 6 and 8

it looks like ;

A B C
1
1
1
2
2
2
3
3
3
Sheet1 Sheet2 Sheet3 Sheet14 Sheet5 6.. 7.. 8..

So my aim is to be first create an empty excell file with 8 Sheet in it.And import Sheet 1 3 5 7 from original excell file and put them to created new excell file without changing anything. Because this worksheets has pivot tables and formulas.
After that from Sorce file Worksheet #2,4,6,8 and from Column A,export data by filtering for example search for lines which starting with '2' in column A. And then import these lines to new excell file with same worksheet names. And rename new excell file name as what i search for in Column A.


I hope my explanation is not so complicated.

Thanks for any help.

Regards.

 



Hi,

Your specification is not very clear when it comes to sheets 2, 4, 6, 8.

Why not just save the workbook as a different name with all the sheets? Then modify accordingly.

Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top