Ted Penner
asked on
Expand macro to ask for filename column
I had this question after viewing Save as filename macro.
This macro is intended to separate a selected number of rows into a file based which rows are selected.
What I would like to do now is expand it so that it is looking at the contents of the filename column to make that decision instead of the selected rows.
I have attached empty sample data which is quite large at over 260,000 rows.
The existing macro is listed in the code below as well as in the attached file.160412-Separation-EE-testing.xlsb
This macro is intended to separate a selected number of rows into a file based which rows are selected.
What I would like to do now is expand it so that it is looking at the contents of the filename column to make that decision instead of the selected rows.
I have attached empty sample data which is quite large at over 260,000 rows.
The existing macro is listed in the code below as well as in the attached file.160412-Separation-EE-testing.xlsb
ASKER
I'm not sure what that did but, I was expecting to see 36 files, each with their own corresponding rows in the folder I chose.
No files were created at all, but no errors.
My original file now contains two headers and has a different filename called "filename".
No files were created at all, but no errors.
My original file now contains two headers and has a different filename called "filename".
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OUTSTANDING!
Fast and easy! That's exactly what I was looking for.
One concern before I run on actual data. In the actual data, there is some sorting, and some of the items have font colors applied to certain text items.
The resulting files should maintain whatever sort order was there originally.
As long as all of that is OK, I'll go ahead and test on actual data after my meeting.
Thank you again sir!!
Fast and easy! That's exactly what I was looking for.
One concern before I run on actual data. In the actual data, there is some sorting, and some of the items have font colors applied to certain text items.
The resulting files should maintain whatever sort order was there originally.
As long as all of that is OK, I'll go ahead and test on actual data after my meeting.
Thank you again sir!!
the colors should remain but use a copy of your file at best
ASKER
Of'course. Can I trust that they will still remain in the same order from where they started?
they should because my code copy the whole sheet then deletes the lines which have a different filename without trying to re-sort it
ASKER
OK great!
pls try
Open in new window
EDIT Corrected codeRegards