Creating New Spreadsheet based on column - Macro Help!

Closed
renntek07 Posts 4 Registration date Friday July 17, 2015 Status Member Last seen August 4, 2015 - Jul 17, 2015 at 12:46 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Aug 5, 2015 at 02:15 AM
Hello,

This is my first time trying to use a Macro, so please bear with me. Anywho, I am using Excel 2007, if that helps. I have a spreadsheet that has a lot of data in it, and one of the columns is called event. I have 11.01 through 11.20 and I need to write a macro that looks at that column, and takes all the rows that have 11.01 in that column, copy it, and paste it in a new spreadsheet, and label it as (event name.today's date), then 11.02 and repeat all the way until the cells in that column are blank, and then stop. I have never written a macro before, so any help you guys can provide would be GREATLY appreciated! I have read some of the other postings and forums here, and you guys seem to know your stuff!

Thanks in advance!

6 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Jul 22, 2015 at 04:42 AM
create a sample file with small amount of data

upload this fie to speedyshare.com and inform the download web address

then explain what you want with respect to the file
0
renntek07 Posts 4 Registration date Friday July 17, 2015 Status Member Last seen August 4, 2015
Jul 28, 2015 at 12:33 PM
I am at work unfortunately and can't upload to a file share site. Here's what it looks like:

Header 1 Header 2 Header 3 Event Header 4
Data Data Data 11.01 Data
Data Data Data 11.01 Data
Data Data Data 11.02 Data
Data Data Data 11.02 Data
Data Data Data 11.02 Data
Data Data Data 11.03 Data
Data Data Data 11.03 Data


I need a formula, that looks at the data under the "Event" column, and will copy all of the data for Event 11.01 and paste it into a new spreadsheet, and save it as an excel file under the .xls format. Once it has done that with 11.01, I want it to move onto 11.02, and do the same steps, and repeat until the Event column has nothing in it. I have 1 big file that needs to be split out into multiple files. Please let me know if you need anything else.
0
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Jul 29, 2015 at 07:13 AM
because your file is big and you are opening new sheets it may take some time. opening of three sheets takes 10 seconds. anyhow try the macaro "test"
download the file from

http://speedy.sh/RPGFH/renntek-150729.xlsm

and run only "test"(though there are two macros in the vb editor)

your comments please
0
renntek07 Posts 4 Registration date Friday July 17, 2015 Status Member Last seen August 4, 2015
Jul 29, 2015 at 08:27 AM
venkat1926, it works very well, however is there a way to have the code create a new file instead of a tab for each event?

Thanks!
0
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811 > renntek07 Posts 4 Registration date Friday July 17, 2015 Status Member Last seen August 4, 2015
Jul 30, 2015 at 02:12 AM
why do you want new file for each event. There will be too many separate files and each file will have only one sheet. not that it cannot be done. please review your requirement
0
renntek07 Posts 4 Registration date Friday July 17, 2015 Status Member Last seen August 4, 2015
Jul 30, 2015 at 01:41 PM
For my job, the data needs to be split out onto separate excel files. It's ok if they have 1 sheet per file, there will be other data that has to be added in manually later. Can this be done?
0
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Jul 31, 2015 at 04:14 AM
ok I shall modify the macro and send it to you in about 24 hours
0

Didn't find the answer you are looking for?

Ask a question
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Aug 5, 2015 at 02:15 AM
BE CAREFUL. The different files like 11.01 are parked in a folder E:\tempo. This folder SHOULD NOT CONTAIN ANY OTHER FILES because for repating the macro the files in this folder are KILLED.
0
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Aug 5, 2015 at 02:15 AM
acknowledge receipt of this WARNING
0