If you look at the script I posted, you'll see that the INI file creates a section for each manager ([MGRA]) and then lists each user's information as a record in that section. I chose to use an INI file because it is VISUAL - you can see how your data is organized. This has many benefits, especially during development of complex processes - you can see how the data is organized, how your code is interpreting results, and how the logic is handling issues like missing fields.
Of course there are alternatives - one is to enumerate your list and find all the manager IDs, collected into an array. You can then use Sort() and Uniq() to change that to an array of unique manager names. Then create a 2-eimension array - the first dimension size is the number of managers, the second is the maximum number of users assigned to a manager.
Then, you can enumerate your data again. Get the MgrID, use AScan to change it to an ID # (the record in the list of managers) and use that as the first pointer to the data array...
Whew!! My point is that you can write complex code and do it all in memory, or you can use the INI file as a disk based array that will permit access by name. Much easier, especially for someone new to coding, usnig arrays, etc.
The second code example that I posted earlier will generate CSV files for each manager, with that manager's users as the data. I used Chr(31) as a delimiter, which is unlikely to conflict with any text in your data. The example will work no matter how you generate the INI file - excel or text file source.
Glenn
_________________________
Actually I
am a Rocket Scientist!