Zlerp
09-08-2014, 02:33 PM
Hello All!
I am looking for help in creating a macro that will split my data into X number of groups and output X text files that will contain the data. I want a prompt to appear when i run the macro that will let me choose how many times i want to evenly split the data. I also want another Prompt that will let me put in the File directory that will create folders and place the .txt into the correct folder.
For Example:
In column A I have 30 rows of data. When i click run, a prompt appears asking me how many times I would like to split the data. I choose 5. Then another prompt appears asking me where i wouild like to save these, I copy and paste a path into it.
Then it will split the 30 rows of data 5 times, meaning A1-A6 will be 1.txt and placed in a folder named 1, A7-A12 will be 2.txt and placed in a folder named 2, A13-A18 will be 3.txt and placed in a folder named 3, A19-A24 will be 4.txt and placed in a folder named 4.....and so on and so forth until its finished. These Foldwers will be saved into the file location I copy and paste into the 2nd prompt.
So In the specified file location I copy and paste I should have 5 folders labeled 1-5 with a corresponding text file in each folder. Each Text file should contain 6 lines of data (A1-A6)
Please let me know if you have any questions or dont understand what I am asking. I could try and post a better example.
THANKS FOR ALL YOUR HELP!!!!!
I am looking for help in creating a macro that will split my data into X number of groups and output X text files that will contain the data. I want a prompt to appear when i run the macro that will let me choose how many times i want to evenly split the data. I also want another Prompt that will let me put in the File directory that will create folders and place the .txt into the correct folder.
For Example:
In column A I have 30 rows of data. When i click run, a prompt appears asking me how many times I would like to split the data. I choose 5. Then another prompt appears asking me where i wouild like to save these, I copy and paste a path into it.
Then it will split the 30 rows of data 5 times, meaning A1-A6 will be 1.txt and placed in a folder named 1, A7-A12 will be 2.txt and placed in a folder named 2, A13-A18 will be 3.txt and placed in a folder named 3, A19-A24 will be 4.txt and placed in a folder named 4.....and so on and so forth until its finished. These Foldwers will be saved into the file location I copy and paste into the 2nd prompt.
So In the specified file location I copy and paste I should have 5 folders labeled 1-5 with a corresponding text file in each folder. Each Text file should contain 6 lines of data (A1-A6)
Please let me know if you have any questions or dont understand what I am asking. I could try and post a better example.
THANKS FOR ALL YOUR HELP!!!!!