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. |
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 |
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, |
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 |
All times are GMT +1. The time now is 06:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com