Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Splitting an excel work book in to two

Hi,
I have an Excel work book and I want to split it in to two csv files
in the same location depening on values in a particular column?
I will reallly appreciate VBA code for this.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Splitting an excel work book in to two

I would start a new workbook.
Then open the workbook with the worksheet to split

Filter to show the first value
copy the visible cells
paste into the first worksheet in that newly created workbook

Save that workbook as a CSV file.

Then do the same kind of thing for the second value.



Shailesh wrote:

Hi,
I have an Excel work book and I want to split it in to two csv files
in the same location depening on values in a particular column?
I will reallly appreciate VBA code for this.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Splitting an excel work book in to two

Hi Dave,
Thank you very much. For example , I have a workbook file.xls with
column A , B,C,D,E,F,G,H,I in sheet1 and depending upon the value
of column D I have to copy column A,B,G,I in to a file called as
file1.csv and else B C D , I in to file file2.csv.

I thought I can write a macros in my worok book and after running
these two files can be created.

Regards,
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Splitting an excel work book in to two

I would do the same thing as that previous suggestion, but then delete the
columns I didn't want in that new worksheet in the new workbook.

Start recording a macro in the existing workbook before you start anything.
Then stop recording after you've saved to both csv files and closed the new
workbook without saving.

The code should be darn close to what you need.

Shailesh wrote:

Hi Dave,
Thank you very much. For example , I have a workbook file.xls with
column A , B,C,D,E,F,G,H,I in sheet1 and depending upon the value
of column D I have to copy column A,B,G,I in to a file called as
file1.csv and else B C D , I in to file file2.csv.

I thought I can write a macros in my worok book and after running
these two files can be created.

Regards,


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel work book Gerry Excel Discussion (Misc queries) 2 June 30th 08 03:04 PM
would like to buy microsoft excel 2007 WORK BOOK MABAR New Users to Excel 1 November 20th 07 02:22 PM
Excel work Book Order Wills Excel Worksheet Functions 1 July 6th 07 03:43 PM
Is there away to keep "auto save" from jumping to the first work sheet in the work book? Marc New Users to Excel 2 April 21st 05 01:27 AM
How to insert pdf files into Excel work book. rowboat Excel Discussion (Misc queries) 1 January 31st 05 06:26 PM


All times are GMT +1. The time now is 11:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"