Hi all,

I have been wracking my brain about what to do regards the below scenario.

I have a master list of data that i need to break up into 12 individual files and belive a macro to be the best way to progress.

Basically this file contains the following:

reference no, number(6)
mins worked, number(5)
date input,number(8) {format yyyymmdd}
location number, number(2).

Its this location number that will be the decisive factor when creating the 12 output files. We have 12 locations, and need a file for each location. Please see sample data below:

821977004152007030301
821985003902007030301
821276004802007030302
821349003162007030302
875104003902007030302
820881002402007030303
820921002402007030303
818186003902007030304
820687003402007030304
820717004602007030304
818968003252007030305
818984002402007030305
818992003902007030305
821861003602007030306
821896004852007030306
818135004282007030307
819621003202007030307
121754006202007030308
218065000402007030308
299121004452007030309
756581004002007030309
819522003052007030310
819700004602007030310
221309005292007030312

the output varies from week to to week (there may be 120 rows on week x, but 145 on week y) so where the location changes is not consistent.

Does anyone have any ideas on how I would go to write a macro based on the info above? If you need me to provide more info, please let me know.
Thanks,