I think I'm going to need some VBA or a Macro for this query.

I have a file that exports data to a CSV, depending upon the data, either two rows could be returned for one record (this tends to be the norm) but we could also have data returned that has upto 5 or more rows returned.

I'll try to demonstrate what I need.
See attached image as my attempt to create a spreadsheet at bottom of thread failed miserably
03-01-2013 16-35-39.jpg

Is somebody able to write me a script so I can work adapt it, there are more columns than this, but hopefully this explains my dilemma.

This is what I tried to recreate i the thread but the spaces were removed
ID Name Address Staff No Department Course ID Course Name Pass Mark
1 Mr A 12 High Street 12345 Accounts 1234 Excel C
1 Mr A 12 High Street 12345 Accounts 1299 Access B
2 Mr B 22 Low Close 34567 IT 1234 Excel A
3 Mr C 96 Middle Road 86745 Accounts 1234 Excel E
3 Mr C 96 Middle Road 86745 Accounts 1299 Access B
3 Mr C 96 Middle Road 86745 Accounts 1494 Powerpoint A

This is what I have to work with and sometimes the data could be 1000+ rows.

ID Name Address Staff No Department Course ID Course Name Pass Mark
1 Mr A 12 High Street 12345 Accounts
1234 Excel C
1299 Access B
2 Mr B 22 Low Close 34567 IT
1234 Excel A
3 Mr C 96 Middle Road 86745 Accounts
1234 Excel E
1299 Access B
1494 Powerpoint A