I want to create a macro which creates files based on contents in column AJ. I want the macro to copy the data from original sheet to the resulting files (only the relevant data for that location). I should have the set of files for each location with the file named as the location name.
I want the macro to create a location file even if there is no information for that location in the data sheet.
My excel file contains data from column A to column AJ. In column AJ the location names are available. Like Bangalore, Cochin, Delhi, Hyderabad, Mumbai, Kolkata. I want the macro to create separate file for each location ( Even if the data is not available for any of the location the macro should create a file) and save the files in the location name.
It's not clear to me what data you wish to copy along, so I just created the macro to get you started.
So please clearify which data needs to be carried over. Like same row as file name.
Also explain where you want that data to be put in the newly created file. Like first row or row 10 or something else.
Asking for path should be no problem, I'll start with it when the above is clear.